diff options
| -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) { | 
