diff options
author | Eugene Sandulenko | 2016-12-26 16:15:38 +0100 |
---|---|---|
committer | GitHub | 2016-12-26 16:15:38 +0100 |
commit | 8477c4beb2de1ad70f355386d745d4f9c1f5d98b (patch) | |
tree | bb5ce96186f0f1dd2e6e6d3995fd2158291a727c /engines/wintermute/base | |
parent | 06b1c251dfdeae3597f96af8e8cb6a7d9e152a35 (diff) | |
parent | a14d3865ad4fbe2cf688e180642bdc5103c5280b (diff) | |
download | scummvm-rg350-8477c4beb2de1ad70f355386d745d4f9c1f5d98b.tar.gz scummvm-rg350-8477c4beb2de1ad70f355386d745d4f9c1f5d98b.tar.bz2 scummvm-rg350-8477c4beb2de1ad70f355386d745d4f9c1f5d98b.zip |
Merge pull request #874 from tobiatesan/fix_getfilename_cr5
WINTERMUTE: Fix PathUtils and add workaround for mixed separators
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/file/base_disk_file.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp index d0c51616f4..0684b3f591 100644 --- a/engines/wintermute/base/file/base_disk_file.cpp +++ b/engines/wintermute/base/file/base_disk_file.cpp @@ -29,6 +29,7 @@ #include "engines/wintermute/dcgf.h" #include "engines/wintermute/base/file/base_disk_file.h" #include "engines/wintermute/base/base_file_manager.h" +#include "engines/wintermute/utils/path_util.h" #include "common/stream.h" #include "common/memstream.h" #include "common/file.h" @@ -37,6 +38,7 @@ #include "common/tokenizer.h" #include "common/config-manager.h" + namespace Wintermute { void correctSlashes(Common::String &fileName) { @@ -150,7 +152,7 @@ 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::FSNode searchNode = getNodeForRelativePath(PathUtil::normalizeFileName(filename)); if (searchNode.exists() && !searchNode.isDirectory() && searchNode.isReadable()) { file = searchNode.createReadStream(); } |