[Scummvm-git-logs] scummvm master -> e51e93c3de6b06ec69b6b1091745049bc6c6ded8
lephilousophe
noreply at scummvm.org
Mon Jan 15 17:53:46 UTC 2024
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:
e51e93c3de COMMON: Fix DumpFile path creation at opening
Commit: e51e93c3de6b06ec69b6b1091745049bc6c6ded8
https://github.com/scummvm/scummvm/commit/e51e93c3de6b06ec69b6b1091745049bc6c6ded8
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-01-15T18:52:36+01:00
Commit Message:
COMMON: Fix DumpFile path creation at opening
Path rework broke it badly
Changed paths:
common/file.cpp
diff --git a/common/file.cpp b/common/file.cpp
index 0d58ce969b3..45f1087f09d 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -166,11 +166,10 @@ bool DumpFile::open(const Path &filename, bool createPath) {
StringArray components = dirname.splitComponents();
Common::Path subpath;
- for (StringArray::iterator it = components.end() - 1; it != components.begin(); --it) {
- subpath.joinInPlace(*it, Common::Path::kNoSeparator);
- if (subpath.empty()) {
- continue;
- }
+ for (StringArray::iterator it = components.begin(); it != components.end(); ++it) {
+ subpath.appendInPlace(*it, Common::Path::kNoSeparator);
+ // Add a trailing path separator
+ subpath.appendInPlace("/");
node = g_system->getFilesystemFactory()->makeFileNodePath(subpath.toString(Common::Path::kNativeSeparator));
if (node->exists()) {
delete node;
More information about the Scummvm-git-logs
mailing list