changeset 21586:3b9524234d89

zip.m: fix error when zipping files with backslash paths on Windows (bug #47609) * zip.m: Use portable file separator understood by the msys zip program when adding files to a zip archive on Windows.
author Philip Nienhuis <prnienhuis@users.sf.net>
date Sun, 03 Apr 2016 00:47:21 +0200
parents bad3ed83330d
children 590136240f7c
files scripts/miscellaneous/zip.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/zip.m	Mon Apr 04 09:00:22 2016 -0700
+++ b/scripts/miscellaneous/zip.m	Sun Apr 03 00:47:21 2016 +0200
@@ -62,6 +62,9 @@
   files = sprintf (' %s', files{:});   # convert to space separated list
   zipfile = regexprep (zipfile, "'", "\\'");  # escape single quotes
   cmd = sprintf ("zip -r '%s' %s", zipfile, files);
+  if (ispc () && ! isunix ())
+    cmd = strrep (cmd, "\\", "/");
+  endif
 
   origdir = pwd ();
   cd (rootdir);