changeset 107039:2220de986185

* arc-mode.el (archive-zip-extract): Quote the argument passed to unzip (Bug#5475).
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 28 Jan 2010 15:06:36 -0500
parents d91412f9e8e4
children 5555e86608c1
files lisp/ChangeLog lisp/arc-mode.el
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Jan 28 14:53:11 2010 -0500
+++ b/lisp/ChangeLog	Thu Jan 28 15:06:36 2010 -0500
@@ -1,3 +1,8 @@
+2010-01-28  Chong Yidong  <cyd@stupidchicken.com>
+
+	* arc-mode.el (archive-zip-extract): Quote the argument passed to
+	unzip (Bug#5475).
+
 2010-01-28  Nil Geisweiller  <ngeiswei@googlemail.com>  (tiny change)
 
 	* progmodes/flymake.el (flymake-allowed-file-name-masks)
--- a/lisp/arc-mode.el	Thu Jan 28 14:53:11 2010 -0500
+++ b/lisp/arc-mode.el	Thu Jan 28 15:06:36 2010 -0500
@@ -1784,7 +1784,10 @@
 (defun archive-zip-extract (archive name)
   (if (equal (car archive-zip-extract) "pkzip")
       (archive-*-extract archive name archive-zip-extract)
-    (archive-extract-by-stdout archive name archive-zip-extract)))
+    ;; unzip expands wildcards in NAME, so we need to quote it.
+    ;; FIXME: Does pkzip need similar treatment?
+    (archive-extract-by-stdout archive (shell-quote-argument name)
+			       archive-zip-extract)))
 
 (defun archive-zip-write-file-member (archive descr)
   (archive-*-write-file-member