[Scummvm-cvs-logs] CVS: scummvm/common file.cpp,1.67,1.68

Max Horn fingolfin at users.sourceforge.net
Thu Aug 5 04:11:15 CEST 2004


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

Modified Files:
	file.cpp 
Log Message:
Try the current dir last, not first

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/file.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- file.cpp	31 Jul 2004 09:34:10 -0000	1.67
+++ file.cpp	5 Aug 2004 11:10:27 -0000	1.68
@@ -142,12 +142,13 @@
 		_handle = fopenNoCase(filename, directory, modeStr);
 	} else {
 		Common::StringList::const_iterator x;
-		// First try the current directory
-		_handle = fopenNoCase(filename, "", modeStr);
-		// Next try all default directories
+		// Try all default directories
 		for (x = _defaultDirectories.begin(); _handle == NULL && x != _defaultDirectories.end(); ++x) {
 			_handle = fopenNoCase(filename, x->c_str(), modeStr);
 		}
+		// Last resort: try the current directory
+		if (_handle == NULL)
+			_handle = fopenNoCase(filename, "", modeStr);
 	}
 
 	if (_handle == NULL) {





More information about the Scummvm-git-logs mailing list