diff options
Diffstat (limited to 'base')
-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("."); } |