From a914b97559276947b24062861162cd92c6c7dea1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 23 Nov 2010 22:33:26 +0000 Subject: 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 --- engines/tinsel/drives.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'engines/tinsel') 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) { -- cgit v1.2.3