changeset 21582:fa58fcb7c51d

zip.m: Fix zipping into directory with spaces. * zip.m: Protect the zip file name when calling unzip to get list of files in archive.
author Rik <rik@octave.org>
date Fri, 01 Apr 2016 21:20:23 -0700
parents 6fab85c1538f
children d5963a6e29c2
files scripts/miscellaneous/zip.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/zip.m	Fri Apr 01 18:16:01 2016 -0700
+++ b/scripts/miscellaneous/zip.m	Fri Apr 01 21:20:23 2016 -0700
@@ -73,7 +73,7 @@
   endif
 
   if (nargout > 0)
-    cmd = ["unzip -Z -1 " zipfile];
+    cmd = sprintf ("unzip -Z -1 '%s'", zipfile);
     [status, filelist] = system (cmd);
     if (status)
       error ("zip: zipinfo failed with exit status = %d", status);