GNU bug report logs - #3770
archive-mode: recognize ZIP files with non-standard "PK00" header

Previous Next

Package: emacs;

Reported by: Peter Jolly <peter <at> jollys.org>

Date: Mon, 6 Jul 2009 22:35:04 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3770 in the body.
You can then email your comments to 3770 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3770; Package emacs. (Mon, 06 Jul 2009 22:35:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peter Jolly <peter <at> jollys.org>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 06 Jul 2009 22:35:05 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Peter Jolly <peter <at> jollys.org>
To: bug-gnu-emacs <at> gnu.org
Subject: archive-mode: recognize ZIP files with non-standard "PK00" header
Date: Mon, 06 Jul 2009 23:28:37 +0100
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




Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Sun, 12 Jul 2009 19:05:08 GMT) Full text and rfc822 format available.

Notification sent to Peter Jolly <peter <at> jollys.org>:
bug acknowledged by developer. (Sun, 12 Jul 2009 19:05:08 GMT) Full text and rfc822 format available.

Message #10 received at 3770-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Peter Jolly <peter <at> jollys.org>
Cc: 3770-done <at> debbugs.gnu.org
Subject: Re: archive-mode: recognize ZIP files with non-standard "PK00" header
Date: Sun, 12 Jul 2009 14:56:27 -0400
> 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.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 10 Aug 2009 14:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.