aboutsummaryrefslogtreecommitdiff
path: root/engines/tinsel/drives.cpp
diff options
context:
space:
mode:
authorMax Horn2010-11-23 22:33:26 +0000
committerMax Horn2010-11-23 22:33:26 +0000
commita914b97559276947b24062861162cd92c6c7dea1 (patch)
tree4e821f845b7ef484e75d3ec9d7fe51cb943e6fd6 /engines/tinsel/drives.cpp
parent1cc80de1d912ecbc962d0d660f282c916a140c50 (diff)
downloadscummvm-rg350-a914b97559276947b24062861162cd92c6c7dea1.tar.gz
scummvm-rg350-a914b97559276947b24062861162cd92c6c7dea1.tar.bz2
scummvm-rg350-a914b97559276947b24062861162cd92c6c7dea1.zip
TINSEL: Fix support for file names with a trailing dot
When copying data files with 8.3 names from a CD, they sometimes end up with a trailing dot, e.g. "INDEX." instead of "INDEX". Comon::File supports this, but in r54392 Tinsel stopped using Common::File. This commit also removes the useless SeekableSubReadStream wrapper around the actual file stream. svn-id: r54446
Diffstat (limited to 'engines/tinsel/drives.cpp')
-rw-r--r--engines/tinsel/drives.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/engines/tinsel/drives.cpp b/engines/tinsel/drives.cpp
index 53cc59e260..6e30caf006 100644
--- a/engines/tinsel/drives.cpp
+++ b/engines/tinsel/drives.cpp
@@ -162,14 +162,10 @@ TinselFile::~TinselFile() {
}
bool TinselFile::openInternal(const Common::String &filename) {
- const Common::FSNode gameDataDir(ConfMan.get("path"));
- const Common::FSNode fsNode = gameDataDir.getChild(filename);
- Common::SeekableReadStream *stream = fsNode.createReadStream();
- if (!stream)
- return false;
-
- _stream = new Common::SeekableSubReadStream(stream, 0, stream->size(), DisposeAfterUse::YES);
- return true;
+ _stream = SearchMan.createReadStreamForMember(filename);
+ if (!_stream)
+ _stream = SearchMan.createReadStreamForMember(filename + ".");
+ return _stream != 0;
}
bool TinselFile::open(const Common::String &filename) {