GNU bug report logs - #6144
23.2; unzip arguments quoting

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sun, 9 May 2010 01:32:02 UTC

Severity: normal

Merged with 6467, 7207

Found in version 23.2

Done: Eli Zaretskii <eliz <at> gnu.org>

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 6144 in the body.
You can then email your comments to 6144 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6144; Package emacs. (Sun, 09 May 2010 01:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 09 May 2010 01:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; unzip arguments quoting
Date: Sun, 09 May 2010 05:10:15 +0400
When I tried to open any zip or jar archive in dired and view contents 
of any file
inside, Emacs just writes "caution: filename not matched: "<internal path>".
An investigation with Process Explorer Monitor has led me to believe 
that Emacs
launches the unzip executable with parameters -qq -c "<filename>"
"\"<internal path>\"", and the extra escaped quotes in the last 
parameter are
the source of the problem.

Replacing

"(if (equal (car archive-zip-extract) "unzip")
     (shell-quote-argument name)
       name)"

with "name"

in arc-mode.el and recompiling the file solved the problem.


In GNU Emacs 23.2.1 (i386-mingw-nt6.1.7600)
 of 2010-05-08 on G41R2F1
Windowing system distributor `Microsoft Corp.', version 6.1.7600
configured using `configure --with-gcc (3.4) --no-opt --cflags 
-Ic:/xpm/include'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: RUS
  value of $XMODIFIERS: nil
  locale-coding-system: cp1251
  default enable-multibyte-characters: t

Major mode: Text

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x d i r e d <return> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> g : \ d o w n <tab> m i r a
n <tab> <tab> <return> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <return>
<down> <down> <up> <up> <down> <return> <help-echo>
<help-echo> <help-echo> C-x C-s a s d C-x C-s a s d
a s d C-x C-c <down-mouse-1> <mouse-1> <help-echo>
<help-echo> <help-echo> C-g M-x r e p o r t - e m a
c s - b u g <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Parsing archive file...done.
(No changes need to be saved)
Saving file g:/Downloads/Miranda 
IM/historyppbn.zip:docs/hpp_changelog.txt...
Updating archive...
apply: Searching for program: no such file or directory, zip
Type C-h for help. [2 times]
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug arc-mode archive-mode help-mode
easymenu view dired regexp-opt tooltip ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 disp-table ls-lisp w32-win w32-vars
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process multi-tty emacs)






Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6144; Package emacs. (Sun, 09 May 2010 21:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 6144 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 6144 <at> debbugs.gnu.org
Subject: Re: bug#6144: 23.2; unzip arguments quoting
Date: Sun, 9 May 2010 23:13:37 +0200
On Sun, May 9, 2010 at 3:10 AM, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> When I tried to open any zip or jar archive in dired and view contents of
> any file
> inside, Emacs just writes "caution: filename not matched: "<internal path>".
> An investigation with Process Explorer Monitor has led me to believe that
> Emacs
> launches the unzip executable with parameters -qq -c "<filename>"
> "\"<internal path>\"", and the extra escaped quotes in the last parameter
> are
> the source of the problem.
>
> Replacing
>
> "(if (equal (car archive-zip-extract) "unzip")
>     (shell-quote-argument name)
>       name)"
>
> with "name"
>
> in arc-mode.el and recompiling the file solved the problem.

Thanks for the bug report, Dmitry. However the current code seems to
work well with the unzip program from gnuwin32:

  UnZip 5.51 of 22 May 2004, by Info-ZIP.

What unzip program are you using?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6144; Package emacs. (Sun, 09 May 2010 23:56:02 GMT) Full text and rfc822 format available.

Message #11 received at 6144 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6144 <at> debbugs.gnu.org
Subject: Re: bug#6144: 23.2; unzip arguments quoting
Date: Mon, 10 May 2010 03:09:38 +0400
[Message part 1 (text/plain, inline)]
On 10.05.2010 1:13, Lennart Borgman wrote:
> Thanks for the bug report, Dmitry. However the current code seems to
> work well with the unzip program from gnuwin32:
>
>    UnZip 5.51 of 22 May 2004, by Info-ZIP.
>
> What unzip program are you using?
>    

The same program and version, although it reports modification date of 
14 Feb 2005.
I've just now verified that emacs 23.1 doesn't exhibit this bug, with 
the same unzip.exe, init.el, etc.

If you compare the sources of archive-zip-extract in arc-mode.el between 
versions 23.1 and 23.2, the addition of (shell-quote-argument name) for 
"unzip" is the main change. It seems that this argument is quoted again 
by 'call-process, see attached callstack.txt and procmon.png.

[callstack.txt (text/plain, attachment)]
[procmon.png (image/png, attachment)]

Merged 6144 6467. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sat, 19 Jun 2010 19:08:02 GMT) Full text and rfc822 format available.

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 25 Jun 2010 11:51:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Fri, 25 Jun 2010 11:51:02 GMT) Full text and rfc822 format available.

Message #18 received at 6144-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 6144-done <at> debbugs.gnu.org, 6467-done <at> debbugs.gnu.org
Subject: Re: bug#6467: 23.2; arc-mode hosed with zip files
Date: Fri, 25 Jun 2010 14:47:39 +0300
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: Juri Linkov <juri <at> jurta.org>, 6467 <at> debbugs.gnu.org
> Date: Sat, 19 Jun 2010 14:24:00 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > I don't see any way of fixing this, except to not quote on DOS and
> > Windows platforms.  It looks like having such file names in zip
> > archives on Windows is asking for trouble anyway, as unzip.exe itself
> > does not support them even from the command line.
> >
> > Objections, anyone?
> 
> Please go ahead, and please do the change in the emacs-23 branch so it
> is included in 23.3.  Thanks.

Done.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 25 Jun 2010 11:51:02 GMT) Full text and rfc822 format available.

Notification sent to Eli Zaretskii <eliz <at> gnu.org>:
bug acknowledged by developer. (Fri, 25 Jun 2010 11:51:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 24 Jul 2010 11:24:03 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 10 Dec 2010 14:11:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 10 Dec 2010 14:28:02 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 31 Dec 2010 01:15:02 GMT) Full text and rfc822 format available.

Merged 6144 6467 7207. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 31 Dec 2010 01:15:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Jan 2011 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 145 days ago.

Previous Next


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