diff scripts/miscellaneous/unpack.m @ 29093:1c212b36a35e

Use "__wglob__" instead of "glob" on Windows (bug #59287). * copyfile.m, fileattrib.m, movefile.m, unpack.m, pkg/private/rebuild.m: On Windows, gnulib's "glob" replacement doesn't work with non-ASCII characters in the file path or name. Use "__wglob__" instead on that platform.
author Markus Mützel <markus.muetzel@gmx.de>
date Mon, 23 Nov 2020 17:33:56 +0100
parents 90fea9cc9caa
children 7854d5752dd2
line wrap: on
line diff
--- a/scripts/miscellaneous/unpack.m	Mon Nov 23 16:11:46 2020 +0900
+++ b/scripts/miscellaneous/unpack.m	Mon Nov 23 17:33:56 2020 +0100
@@ -93,7 +93,11 @@
   if (numel (file) == 1)
     ## FIXME: The code below is not a perfect test for a URL
     if (isempty (strfind (file{1}, "://")))
-      gfile = glob (file);
+      if (ispc ())
+        gfile = __wglob__ (file);
+      else
+        gfile = glob (file);
+      endif
       if (isempty (gfile))
         error ('unpack: FILE "%s" not found', file{1});
       else