From 1dba198cbf88059e9033067086a0a7b59917527a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 26 Apr 2006 08:36:55 +0000 Subject: Proper fix for bug #1476651: Do not use File::exists to check for the presence of a directory described by an absolute path svn-id: r22174 --- base/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'base') diff --git a/base/main.cpp b/base/main.cpp index 95457bef32..409a42ad9d 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -168,11 +168,13 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String & // 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("."); } -- cgit v1.2.3