[Scummvm-cvs-logs] SF.net SVN: scummvm: [22173] scummvm/trunk/engines/scumm/he/resource_he.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Apr 26 01:36:12 CEST 2006


Revision: 22173
Author:   fingolfin
Date:     2006-04-26 01:35:54 -0700 (Wed, 26 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22173&view=rev

Log Message:
-----------
Replace unneeded File::exists calls

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/he/resource_he.cpp
Modified: scummvm/trunk/engines/scumm/he/resource_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/resource_he.cpp	2006-04-26 08:34:01 UTC (rev 22172)
+++ scummvm/trunk/engines/scumm/he/resource_he.cpp	2006-04-26 08:35:54 UTC (rev 22173)
@@ -1285,24 +1285,24 @@
 		_fileName = _vm->generateFilename(-3);
 
 		// Some programs write it as .bin. Try that too
-		if (!in.exists(_fileName)) {
+		if (!in.open(_fileName)) {
 			Common::String tmp(_fileName);
 			
 			_fileName += ".bin";
 
-			if (!in.exists(_fileName)) {
+			if (!in.open(_fileName)) {
 				// And finally check if we have dumped resource fork
 				_fileName = tmp;
 				_fileName += ".bin";
-				if (!in.exists(_fileName)) {
+				if (!in.open(_fileName)) {
 					error("Cannot open file any of files '%s', '%s.bin', '%s.rsrc",
 						  tmp.c_str(), tmp.c_str(), tmp.c_str());
 				}
 			}
 		}
-	}
+	} else
+		in.open(_fileName);
 
-	in.open(_fileName);
 	if (!in.isOpen()) {
 		error("Cannot open file %s", _fileName.c_str());
 	}


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