[Scummvm-cvs-logs] SF.net SVN: scummvm:[52450] scummvm/trunk/engines/sci/engine/kfile.cpp

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Mon Aug 30 12:14:50 CEST 2010


Revision: 52450
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52450&view=rev
Author:   m_kiewitz
Date:     2010-08-30 10:14:50 +0000 (Mon, 30 Aug 2010)

Log Message:
-----------
SCI: check filesize of qfg import files

filter out files that are larger than 1k, actually removes real saved games from the list

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kfile.cpp

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2010-08-30 08:47:57 UTC (rev 52449)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2010-08-30 10:14:50 UTC (rev 52450)
@@ -914,9 +914,17 @@
 		_virtualFiles.push_back("");
 		Common::StringArray::iterator it;
 		Common::StringArray::iterator it_end = foundFiles.end();
+		Common::SaveFileManager *saveFileMan = g_engine->getSaveFileManager();
+
 		for (it = foundFiles.begin(); it != it_end; it++) {
 			Common::String regularFilename = *it;
 			Common::String wrappedFilename = Common::String(regularFilename.c_str() + fileMask.size() - 1);
+
+			Common::SeekableReadStream *testfile = saveFileMan->openForLoading(regularFilename);
+			int32 testfileSize = testfile->size();
+			delete testfile;
+			if (testfileSize > 1024)
+				continue;
 			// We need to remove the prefix for display purposes
 			_files.push_back(wrappedFilename);
 			// but remember the actual name as well


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