diff options
author | Max Horn | 2006-04-26 08:36:55 +0000 |
---|---|---|
committer | Max Horn | 2006-04-26 08:36:55 +0000 |
commit | 1dba198cbf88059e9033067086a0a7b59917527a (patch) | |
tree | 5b20008c9b83eb1e05701120977f6befc6184452 | |
parent | c940380314d1336c0a703bf89e3f0a17a7e3d819 (diff) | |
download | scummvm-rg350-1dba198cbf88059e9033067086a0a7b59917527a.tar.gz scummvm-rg350-1dba198cbf88059e9033067086a0a7b59917527a.tar.bz2 scummvm-rg350-1dba198cbf88059e9033067086a0a7b59917527a.zip |
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
-rw-r--r-- | base/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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("."); } |