From unknown Mon Aug 18 11:27:17 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3770: archive-mode: recognize ZIP files with non-standard "PK00" header Reply-To: Peter Jolly , 3770@debbugs.gnu.org Resent-From: Peter Jolly Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 06 Jul 2009 22:35:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3770 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.1246919382633 (code B ref -1); Mon, 06 Jul 2009 22:35:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Jul 2009 22:29:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=AWL,FOURLA,IMPRONONCABLE_2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n66MTbFf000621 for ; Mon, 6 Jul 2009 15:29:39 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNwgr-0001gI-CE for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNwgq-0001f7-6V for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:37 -0400 Received: from [199.232.76.173] (port=42256 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNwgq-0001f4-4C for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:36 -0400 Received: from honeysuckle.london.02.net ([87.194.255.144]:39206) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNwgp-0006AB-J7 for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:35 -0400 Received: from localhost (87.194.117.80) by honeysuckle.london.02.net (8.5.016.1) id 4A23EDE60272D573 for bug-gnu-emacs@gnu.org; Mon, 6 Jul 2009 23:28:37 +0100 From: Peter Jolly To: bug-gnu-emacs@gnu.org Date: Mon, 06 Jul 2009 23:28:37 +0100 Message-ID: <87r5wt78fe.fsf@haeleth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Some ZIP files have the string "PK00" before the first PK^C^D header. Apparently this is added by certain archivers when writing to removable media. archive-find-type does not currently recognize such files. The rest of archive-mode handles them correctly, so I believe they can be supported with a trivial change: something like diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index cc59d6e..174d205 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -716,7 +716,7 @@ archive. ;; The funny [] here make it unlikely that the .elc file will be treated ;; as an archive by other software. (let (case-fold-search) - (cond ((looking-at "[P]K\003\004") 'zip) + (cond ((looking-at "\\(PK00\\)?[P]K\003\004") 'zip) ((looking-at "..-l[hz][0-9ds]-") 'lzh) ((looking-at "....................[\334]\247\304\375") 'zoo) ((and (looking-at "\C-z") ; signature too simple, IMHO From unknown Mon Aug 18 11:27:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Peter Jolly Subject: bug#3770 closed by Chong Yidong (Re: archive-mode: recognize ZIP files with non-standard "PK00" header) Message-ID: References: <87ab39wx0k.fsf@stupidchicken.com> <87r5wt78fe.fsf@haeleth.net> X-Emacs-PR-Message: they-closed 3770 X-Emacs-PR-Package: emacs Reply-To: 3770@debbugs.gnu.org Date: Sun, 12 Jul 2009 19:05:09 +0000 Content-Type: multipart/mixed; boundary="----------=_1247425509-15322-1" This is a multi-part message in MIME format... ------------=_1247425509-15322-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #3770: archive-mode: recognize ZIP files with non-standard "PK00" header It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 3770: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3770 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1247425509-15322-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3770-done) by emacsbugs.donarmstrong.com; 12 Jul 2009 18:56:37 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=AWL,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po28.its.yale.edu (pantheon-po28.its.yale.edu [130.132.50.123]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6CIuX8r013922 for <3770-done@emacsbugs.donarmstrong.com>; Sun, 12 Jul 2009 11:56:35 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po28.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n6CIuRoL024550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 12 Jul 2009 14:56:28 -0400 Received: by furry (Postfix, from userid 1000) id CB0A8C09B; Sun, 12 Jul 2009 14:56:27 -0400 (EDT) From: Chong Yidong To: Peter Jolly Cc: 3770-done@debbugs.gnu.org Subject: Re: archive-mode: recognize ZIP files with non-standard "PK00" header Date: Sun, 12 Jul 2009 14:56:27 -0400 Message-ID: <87ab39wx0k.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > Some ZIP files have the string "PK00" before the first PK^C^D header. > Apparently this is added by certain archivers when writing to removable > media. Thanks. I've checked in your patch into CVS trunk. ------------=_1247425509-15322-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 6 Jul 2009 22:29:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=AWL,FOURLA,IMPRONONCABLE_2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n66MTbFf000621 for ; Mon, 6 Jul 2009 15:29:39 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MNwgr-0001gI-CE for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MNwgq-0001f7-6V for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:37 -0400 Received: from [199.232.76.173] (port=42256 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MNwgq-0001f4-4C for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:36 -0400 Received: from honeysuckle.london.02.net ([87.194.255.144]:39206) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MNwgp-0006AB-J7 for bug-gnu-emacs@gnu.org; Mon, 06 Jul 2009 18:29:35 -0400 Received: from localhost (87.194.117.80) by honeysuckle.london.02.net (8.5.016.1) id 4A23EDE60272D573 for bug-gnu-emacs@gnu.org; Mon, 6 Jul 2009 23:28:37 +0100 From: Peter Jolly To: bug-gnu-emacs@gnu.org Subject: archive-mode: recognize ZIP files with non-standard "PK00" header Date: Mon, 06 Jul 2009 23:28:37 +0100 Message-ID: <87r5wt78fe.fsf@haeleth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Some ZIP files have the string "PK00" before the first PK^C^D header. Apparently this is added by certain archivers when writing to removable media. archive-find-type does not currently recognize such files. The rest of archive-mode handles them correctly, so I believe they can be supported with a trivial change: something like diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index cc59d6e..174d205 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -716,7 +716,7 @@ archive. ;; The funny [] here make it unlikely that the .elc file will be treated ;; as an archive by other software. (let (case-fold-search) - (cond ((looking-at "[P]K\003\004") 'zip) + (cond ((looking-at "\\(PK00\\)?[P]K\003\004") 'zip) ((looking-at "..-l[hz][0-9ds]-") 'lzh) ((looking-at "....................[\334]\247\304\375") 'zoo) ((and (looking-at "\C-z") ; signature too simple, IMHO ------------=_1247425509-15322-1--