Mercurial > octave
changeset 28868:f45b11396662
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 08 Oct 2020 16:07:39 +0200 |
parents | 914b2a694824 (current diff) ed029f40be15 (diff) |
children | 4e64416772f1 |
files | liboctave/system/file-stat.cc |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/system/file-stat.cc Thu Oct 08 11:50:05 2020 +0200 +++ b/liboctave/system/file-stat.cc Thu Oct 08 16:07:39 2020 +0200 @@ -194,7 +194,12 @@ std::string full_file_name = sys::file_ops::tilde_expand (file_name); #if defined (OCTAVE_USE_WINDOWS_API) - full_file_name = sys::canonicalize_file_name (full_file_name); + std::string canon_file_name + = sys::canonicalize_file_name (full_file_name); + + // Might have failed for files with non-ASCII characters in name + if (! canon_file_name.empty ()) + full_file_name = canon_file_name; // Remove trailing slashes while (full_file_name.length () > 1