diff options
| author | Max Horn | 2006-04-26 14:05:34 +0000 |
|---|---|---|
| committer | Max Horn | 2006-04-26 14:05:34 +0000 |
| commit | cd528083f955dece5bf1c97085efc1d8b0e5857f (patch) | |
| tree | 871cf889cf789c9936213e0d470d2af98c44f0cc /common | |
| parent | 092fd961456ff20026886c6f30d2c6c00d532165 (diff) | |
| download | scummvm-rg350-cd528083f955dece5bf1c97085efc1d8b0e5857f.tar.gz scummvm-rg350-cd528083f955dece5bf1c97085efc1d8b0e5857f.tar.bz2 scummvm-rg350-cd528083f955dece5bf1c97085efc1d8b0e5857f.zip | |
Removed 'directory' parameter of File::open
svn-id: r22183
Diffstat (limited to 'common')
| -rw-r--r-- | common/file.cpp | 7 | ||||
| -rw-r--r-- | common/file.h | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/common/file.cpp b/common/file.cpp index 267b993276..f7632b0b75 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -184,7 +184,7 @@ void File::decRef() { } -bool File::open(const String &filename, AccessMode mode, const char *directory) { +bool File::open(const String &filename, AccessMode mode) { assert(mode == kFileReadMode || mode == kFileWriteMode); if (filename.empty()) { @@ -201,9 +201,8 @@ bool File::open(const String &filename, AccessMode mode, const char *directory) fname.toLowercase(); const char *modeStr = (mode == kFileReadMode) ? "rb" : "wb"; - if (mode == kFileWriteMode || directory) { - String dir(directory ? directory : ""); - _handle = fopenNoCase(filename, dir, modeStr); + if (mode == kFileWriteMode) { + _handle = fopenNoCase(filename, "", modeStr); } else if (_filesMap && _filesMap->contains(fname)) { fname = (*_filesMap)[fname]; debug(3, "Opening hashed: %s", fname.c_str()); diff --git a/common/file.h b/common/file.h index 995e776a82..eafb7adba9 100644 --- a/common/file.h +++ b/common/file.h @@ -60,7 +60,7 @@ public: void incRef(); void decRef(); - virtual bool open(const String &filename, AccessMode mode = kFileReadMode, const char *directory = NULL); + virtual bool open(const String &filename, AccessMode mode = kFileReadMode); static bool exists(const String &filename); virtual void close(); |
