From unknown Mon Aug 18 14:23:55 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#3770 <3770@debbugs.gnu.org> To: bug#3770 <3770@debbugs.gnu.org> Subject: Status: archive-mode: recognize ZIP files with non-standard "PK00" header Reply-To: bug#3770 <3770@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:23:55 +0000 retitle 3770 archive-mode: recognize ZIP files with non-standard "PK00" hea= der reassign 3770 emacs submitter 3770 Peter Jolly severity 3770 normal thanks From peter@jollys.org Mon Jul 6 15:29:42 2009 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 From cyd@stupidchicken.com Sun Jul 12 11:56:37 2009 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. From unknown Mon Aug 18 14:23:55 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Mon, 10 Aug 2009 14:24:11 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator