[Scummvm-cvs-logs] SF.net SVN: scummvm: [22174] scummvm/trunk/base/main.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Apr 26 01:38:17 CEST 2006


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

Log Message:
-----------
Proper fix for bug #1476651: Do not use File::exists to check for the presence of a directory described by an absolute path

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2006-04-26 08:35:54 UTC (rev 22173)
+++ scummvm/trunk/base/main.cpp	2006-04-26 08:36:55 UTC (rev 22174)
@@ -168,11 +168,13 @@
 	// We add it here, so MD5-based detection will be able to
 	// read mixed case files
 	if (ConfMan.hasKey("path")) {
-		if (!Common::File::exists(ConfMan.get("path"))) {
-			warning("Game directory does not exist (%s)", ConfMan.get("path").c_str());
+		Common::String path(ConfMan.get("path"));
+		FilesystemNode dir(path);
+		if (!dir.isValid() || !dir.isDirectory()) {
+			warning("Game directory does not exist (%s)", path.c_str());
 			return 0;
 		}
-		Common::File::addDefaultDirectory(ConfMan.get("path"));
+		Common::File::addDefaultDirectory(path);
 	} else {
 		Common::File::addDefaultDirectory(".");
 	}


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