diff options
author | Max Horn | 2008-09-29 10:32:06 +0000 |
---|---|---|
committer | Max Horn | 2008-09-29 10:32:06 +0000 |
commit | a4292055f7d5d058a71c69c53f62330f906fdda7 (patch) | |
tree | f58774a849c657b6da0dbbcfb0b3a076b2e90cac /common | |
parent | 00ca130f19dad1e2c3821d370dfe6893a2a3cd7e (diff) | |
download | scummvm-rg350-a4292055f7d5d058a71c69c53f62330f906fdda7.tar.gz scummvm-rg350-a4292055f7d5d058a71c69c53f62330f906fdda7.tar.bz2 scummvm-rg350-a4292055f7d5d058a71c69c53f62330f906fdda7.zip |
File::open no longer falls back to searching the current dir (if this causes any regressions, please report them; don't work around them, don't revert this change, without discussing it first)
svn-id: r34680
Diffstat (limited to 'common')
-rw-r--r-- | common/file.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/common/file.cpp b/common/file.cpp index 0ddeb93324..6558dfea33 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -80,16 +80,11 @@ bool File::open(const String &filename) { // WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails" // sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot) debug(3, "Opening hashed: %s.", filename.c_str()); - _handle = SearchMan.openFile(filename); - } else { - // Last resort: try the current directory - FilesystemNode file(filename); - if (file.exists() && !file.isDirectory()) - _handle = file.openForReading(); + _handle = SearchMan.openFile(filename + "."); } if (_handle == NULL) - debug(2, "File %s not opened", filename.c_str()); + debug(2, "File::open: '%s' not found", filename.c_str()); else _name = filename; @@ -118,7 +113,7 @@ bool File::open(const FilesystemNode &node) { _handle = node.openForReading(); if (_handle == NULL) - debug(2, "File %s not found", filename.c_str()); + debug(2, "File::open: '%s' not found", node.getPath().c_str()); else _name = filename; @@ -132,11 +127,6 @@ bool File::exists(const String &filename) { // WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails" // sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot) return true; - } else { - // Last resort: try the current directory - FilesystemNode file(filename); - if (file.exists() && !file.isDirectory()) - return true; } return false; |