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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Oct 29 21:31:35 CET 2009


Revision: 45507
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45507&view=rev
Author:   thebluegr
Date:     2009-10-29 20:31:35 +0000 (Thu, 29 Oct 2009)

Log Message:
-----------
Stop SQ4 floppy from updating the unused sq4sg.dir file when deleting a saved game

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

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2009-10-29 19:32:27 UTC (rev 45506)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2009-10-29 20:31:35 UTC (rev 45507)
@@ -761,6 +761,21 @@
 		Common::String name = s->_segMan->getString(argv[1]);
 		int mode = argv[2].toUint16();
 
+		// SQ4 floppy prepends /\ to the filenames
+		if (name.hasPrefix("/\\")) {
+			name.deleteChar(0);
+			name.deleteChar(0);
+		}
+
+		// SQ4 floppy attempts to update the savegame index file sq4sg.dir
+		// when deleting saved games. We don't use an index file for saving
+		// or loading, so just stop the game from modifying the file here
+		// in order to avoid having it saved in the ScummVM save directory
+		if (name == "sq4sg.dir") {
+			debugC(2, kDebugLevelFile, "Not opening unused file sq4sg.dir");
+			return SIGNAL_REG;
+		}
+
 		if (name.empty()) {
 			warning("Attempted to open a file with an empty filename");
 			return SIGNAL_REG;


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