[Scummvm-cvs-logs] SF.net SVN: scummvm:[34680] scummvm/trunk/common/file.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Sep 29 12:32:07 CEST 2008


Revision: 34680
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34680&view=rev
Author:   fingolfin
Date:     2008-09-29 10:32:06 +0000 (Mon, 29 Sep 2008)

Log Message:
-----------
File::open no longer falls back to searching the current dir (if this causes any regressions, please report them; don't work around them, don't revert this change, without discussing it first)

Modified Paths:
--------------
    scummvm/trunk/common/file.cpp

Modified: scummvm/trunk/common/file.cpp
===================================================================
--- scummvm/trunk/common/file.cpp	2008-09-29 10:30:31 UTC (rev 34679)
+++ scummvm/trunk/common/file.cpp	2008-09-29 10:32:06 UTC (rev 34680)
@@ -80,16 +80,11 @@
 		// WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails"
 		// sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
 		debug(3, "Opening hashed: %s.", filename.c_str());
-		_handle = SearchMan.openFile(filename);
-	} else {
-		// Last resort: try the current directory
-		FilesystemNode file(filename);
-		if (file.exists() && !file.isDirectory())
-			_handle = file.openForReading();
+		_handle = SearchMan.openFile(filename + ".");
 	}
 	
 	if (_handle == NULL)
-		debug(2, "File %s not opened", filename.c_str());
+		debug(2, "File::open: '%s' not found", filename.c_str());
 	else
 		_name = filename;
 
@@ -118,7 +113,7 @@
 	_handle = node.openForReading();
 
 	if (_handle == NULL)
-		debug(2, "File %s not found", filename.c_str());
+		debug(2, "File::open: '%s' not found", node.getPath().c_str());
 	else
 		_name = filename;
 
@@ -132,11 +127,6 @@
 		// WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails"
 		// sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot)
 		return true;
-	} else {
-		// Last resort: try the current directory
-		FilesystemNode file(filename);
-		if (file.exists() && !file.isDirectory())
-			return true;
 	}
 	
 	return false;


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