Mercurial > octave
changeset 31197:8d4c87e88d0e
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 23 Aug 2022 19:45:19 +0200 |
parents | 776446acdc7b (current diff) 4c38cf0ce06c (diff) |
children | 8bd9b64aeb01 |
files | |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/system/file-ops.cc Fri Aug 19 08:54:05 2022 +0200 +++ b/liboctave/system/file-ops.cc Tue Aug 23 19:45:19 2022 +0200 @@ -750,11 +750,12 @@ // If the initial path looked like a mapped network drive, replace // portion of path that corresponds to mapped root with drive root. - if (name.size () < 2 || name[1] != ':') + if (name.size () < 3 || name[1] != ':') return retval; // UNC path corresponding to original drive letter (mappped drive) - std::wstring orig_map = wname.substr (0, 2); + std::wstring orig_map = wname.substr (0, 3); + orig_map[2] = L'\\'; HANDLE h_map = CreateFileW (orig_map.c_str (), GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS