diff options
-rw-r--r-- | engines/wintermute/base/file/base_disk_file.cpp | 9 |
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(); } |