[Scummvm-cvs-logs] SF.net SVN: scummvm:[54446] scummvm/trunk/engines/tinsel/drives.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Nov 23 23:33:26 CET 2010


Revision: 54446
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54446&view=rev
Author:   fingolfin
Date:     2010-11-23 22:33:26 +0000 (Tue, 23 Nov 2010)

Log Message:
-----------
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.

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/drives.cpp

Modified: scummvm/trunk/engines/tinsel/drives.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/drives.cpp	2010-11-23 22:33:10 UTC (rev 54445)
+++ scummvm/trunk/engines/tinsel/drives.cpp	2010-11-23 22:33:26 UTC (rev 54446)
@@ -162,14 +162,10 @@
 }
 
 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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list