# HG changeset patch # User Philip Nienhuis # Date 1459637241 -7200 # Node ID 3b9524234d89e9c3e0dd6eab6864d4029936ce2d # Parent bad3ed83330d0967722a16f8f8d6341d624244ea 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. diff -r bad3ed83330d -r 3b9524234d89 scripts/miscellaneous/zip.m --- 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);