aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorRyper_Zsolt2016-03-21 21:42:39 +0100
committerTobia Tesan2016-12-26 15:09:16 +0100
commit257d7e8fe04f942d7c85d27181601774cb853463 (patch)
tree8a11c4419fd2a15386a8f27bd51856b192bd591f /engines
parent72376681afad3e57ffa2134d76ad649a38c86023 (diff)
downloadscummvm-rg350-257d7e8fe04f942d7c85d27181601774cb853463.tar.gz
scummvm-rg350-257d7e8fe04f942d7c85d27181601774cb853463.tar.bz2
scummvm-rg350-257d7e8fe04f942d7c85d27181601774cb853463.zip
WINTERMUTE: Don't mix different path separators.
Fixes #7068
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/base/file/base_disk_file.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp
index 82a9e24dfb..b051c2ec39 100644
--- a/engines/wintermute/base/file/base_disk_file.cpp
+++ b/engines/wintermute/base/file/base_disk_file.cpp
@@ -135,7 +135,14 @@ Common::SeekableReadStream *openDiskFile(const Common::String &filename) {
}
// File wasn't found in SearchMan, try to parse the path as a relative path.
if (!file) {
- Common::FSNode searchNode = getNodeForRelativePath(filename);
+ Common::String filenameBackSlash = filename;
+ for (size_t i = 0; i < filenameBackSlash.size(); i++) {
+ if (filenameBackSlash[i] == '/') {
+ filenameBackSlash.setChar('\\', i);
+ }
+ }
+
+ Common::FSNode searchNode = getNodeForRelativePath(filenameBackSlash);
if (searchNode.exists() && !searchNode.isDirectory() && searchNode.isReadable()) {
file = searchNode.createReadStream();
}