diff options
author | Max Horn | 2004-11-07 17:20:32 +0000 |
---|---|---|
committer | Max Horn | 2004-11-07 17:20:32 +0000 |
commit | f6d9b66e21cb10ff8a69e7d8296b0a890f163ce4 (patch) | |
tree | 12370517daef4198367ad556a949a34841aece5a /common/file.cpp | |
parent | 8e4b36cb51562629ffa2eda2f4b8f2fa4fd9bf2f (diff) | |
download | scummvm-rg350-f6d9b66e21cb10ff8a69e7d8296b0a890f163ce4.tar.gz scummvm-rg350-f6d9b66e21cb10ff8a69e7d8296b0a890f163ce4.tar.bz2 scummvm-rg350-f6d9b66e21cb10ff8a69e7d8296b0a890f163ce4.zip |
For now, perform writing always in the current directory (the old code would just create a new file in the first place it was looking at when using the write mode, which definitely is not what we want in most cases)
svn-id: r15730
Diffstat (limited to 'common/file.cpp')
-rw-r--r-- | common/file.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/file.cpp b/common/file.cpp index d264574a17..cbc2ca6e00 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -138,8 +138,8 @@ bool File::open(const char *filename, AccessMode mode, const char *directory) { clearIOFailed(); const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb"; - if (directory) { - _handle = fopenNoCase(filename, directory, modeStr); + if (mode == kFileWriteMode || directory) { + _handle = fopenNoCase(filename, directory ? directory : "", modeStr); } else { Common::StringList::const_iterator x; // Try all default directories |