[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.72,1.73

Max Horn fingolfin at users.sourceforge.net
Sun Nov 7 11:14:01 CET 2004


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7672

Modified Files:
	file.cpp 
Log Message:
For now, perform writing always in the current directory (the old code would just create a new file in the first place it was looking at when using the write mode, which definitely is not what we want in most cases)

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- file.cpp	19 Oct 2004 18:28:41 -0000	1.72
+++ file.cpp	7 Nov 2004 17:20:32 -0000	1.73
@@ -138,8 +138,8 @@
 	clearIOFailed();
 
 	const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb";
-	if (directory) {
-		_handle = fopenNoCase(filename, directory, modeStr);
+	if (mode == kFileWriteMode || directory) {
+		_handle = fopenNoCase(filename, directory ? directory : "", modeStr);
 	} else {
 		Common::StringList::const_iterator x;
 		// Try all default directories





More information about the Scummvm-git-logs mailing list