changeset 29539:b51ba0fdd513

Windows: Fix using glob patterns with non-ASCII characters. * liboctave/util/oct-glob.cc (windows_glob): Use Unicode API for checking file existance on Windows.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 17 Apr 2021 12:21:35 +0200
parents d1cb1b0e9c05
children b6f80b1d448f
files liboctave/util/oct-glob.cc
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/oct-glob.cc	Sat Apr 17 12:20:54 2021 +0200
+++ b/liboctave/util/oct-glob.cc	Sat Apr 17 12:21:35 2021 +0200
@@ -247,7 +247,8 @@
               if (xpat.empty ())
                 {
                   // don't glob if input is only disc root
-                  if (PathFileExistsA (pat(i).c_str ()))
+                  std::wstring wpat = u8_to_wstring (pat(i));
+                  if (PathFileExistsW (wpat.c_str ()))
                     {
                       if (sys::file_ops::is_dir_sep (pat(i).back ()))
                         dirlist.push_back (dir +