diff options
author | Max Horn | 2004-08-05 11:10:27 +0000 |
---|---|---|
committer | Max Horn | 2004-08-05 11:10:27 +0000 |
commit | 61bf615168d1619f97d00ed7b08ea4a92c916732 (patch) | |
tree | 96523befb66ee338c4640ee6d93ec53ceb1a9c8d | |
parent | b154e524a9b8e862dbf34e868264ab8d11f21066 (diff) | |
download | scummvm-rg350-61bf615168d1619f97d00ed7b08ea4a92c916732.tar.gz scummvm-rg350-61bf615168d1619f97d00ed7b08ea4a92c916732.tar.bz2 scummvm-rg350-61bf615168d1619f97d00ed7b08ea4a92c916732.zip |
Try the current dir last, not first
svn-id: r14469
-rw-r--r-- | common/file.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/file.cpp b/common/file.cpp index adf0eca1af..6b7b954942 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -142,12 +142,13 @@ bool File::open(const char *filename, AccessMode mode, const char *directory) { _handle = fopenNoCase(filename, directory, modeStr); } else { Common::StringList::const_iterator x; - // First try the current directory - _handle = fopenNoCase(filename, "", modeStr); - // Next try all default directories + // Try all default directories for (x = _defaultDirectories.begin(); _handle == NULL && x != _defaultDirectories.end(); ++x) { _handle = fopenNoCase(filename, x->c_str(), modeStr); } + // Last resort: try the current directory + if (_handle == NULL) + _handle = fopenNoCase(filename, "", modeStr); } if (_handle == NULL) { |