aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2006-04-26 08:35:54 +0000
committerMax Horn2006-04-26 08:35:54 +0000
commitc940380314d1336c0a703bf89e3f0a17a7e3d819 (patch)
treee23d344d205d9e92213feb6ce92da7eeed8eb3dc /engines/scumm
parent8fdcfedf19d3d7f7c0b8d56a2dfe9c6b090da411 (diff)
downloadscummvm-rg350-c940380314d1336c0a703bf89e3f0a17a7e3d819.tar.gz
scummvm-rg350-c940380314d1336c0a703bf89e3f0a17a7e3d819.tar.bz2
scummvm-rg350-c940380314d1336c0a703bf89e3f0a17a7e3d819.zip
Replace unneeded File::exists calls
svn-id: r22173
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/resource_he.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/he/resource_he.cpp b/engines/scumm/he/resource_he.cpp
index 103d9b8e32..4e3dd59c9c 100644
--- a/engines/scumm/he/resource_he.cpp
+++ b/engines/scumm/he/resource_he.cpp
@@ -1285,24 +1285,24 @@ int MacResExtractor::extractResource(int id, byte **buf) {
_fileName = _vm->generateFilename(-3);
// Some programs write it as .bin. Try that too
- if (!in.exists(_fileName)) {
+ if (!in.open(_fileName)) {
Common::String tmp(_fileName);
_fileName += ".bin";
- if (!in.exists(_fileName)) {
+ if (!in.open(_fileName)) {
// And finally check if we have dumped resource fork
_fileName = tmp;
_fileName += ".bin";
- if (!in.exists(_fileName)) {
+ if (!in.open(_fileName)) {
error("Cannot open file any of files '%s', '%s.bin', '%s.rsrc",
tmp.c_str(), tmp.c_str(), tmp.c_str());
}
}
}
- }
+ } else
+ in.open(_fileName);
- in.open(_fileName);
if (!in.isOpen()) {
error("Cannot open file %s", _fileName.c_str());
}