[Scummvm-git-logs] scummvm master -> 8fee01379f10e52d150d899ec364fceefa12b7d7
criezy
criezy at scummvm.org
Wed Apr 28 00:44:43 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8fee01379f AGS: Fix remapping of paths that contain two consecutive path separators
Commit: 8fee01379f10e52d150d899ec364fceefa12b7d7
https://github.com/scummvm/scummvm/commit/8fee01379f10e52d150d899ec364fceefa12b7d7
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-28T01:44:34+01:00
Commit Message:
AGS: Fix remapping of paths that contain two consecutive path separators
This fixes bug #12477. Heroin's Quest tries to create a file named
"$SAVEGAMEDIR$\\hqrecord.dat" and when remapping this name the
second backslash was left in the name. Creating a file with a
backslash in the name worked on some system, but failed at least
on Windows.
Changed paths:
engines/ags/engine/ac/file.cpp
diff --git a/engines/ags/engine/ac/file.cpp b/engines/ags/engine/ac/file.cpp
index a0abcf15a7..583dc0da42 100644
--- a/engines/ags/engine/ac/file.cpp
+++ b/engines/ags/engine/ac/file.cpp
@@ -343,7 +343,9 @@ bool ResolveScriptPath(const String &orig_sc_path, bool read_only, ResolvedPath
}
}
- if (child_path[0u] == '\\' || child_path[0u] == '/')
+ // Sometimes we have multiple consecutive slashes or backslashes.
+ // Remove all of them at the start of the child path.
+ while (child_path[0u] == '\\' || child_path[0u] == '/')
child_path.ClipLeft(1);
#if AGS_PLATFORM_SCUMMVM
More information about the Scummvm-git-logs
mailing list