aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-04-26 08:13:25 +0000
committerMax Horn2006-04-26 08:13:25 +0000
commitf42bb14ea3f0c4e4801a026d6ff9cd881d0999df (patch)
tree1bbe3d28e0393daae113966fd331736643e3eb00
parentd5224d87bbdc89101801228236e6925995669bd2 (diff)
downloadscummvm-rg350-f42bb14ea3f0c4e4801a026d6ff9cd881d0999df.tar.gz
scummvm-rg350-f42bb14ea3f0c4e4801a026d6ff9cd881d0999df.tar.bz2
scummvm-rg350-f42bb14ea3f0c4e4801a026d6ff9cd881d0999df.zip
Commited *correct* File::exists reimplementation (compared to my incomplete previous commit. Aargh)
svn-id: r22170
-rw-r--r--common/file.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/file.cpp b/common/file.cpp
index 29c3b332da..90acdb45d3 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -263,9 +263,8 @@ bool File::open(const String &filename, AccessMode mode, const char *directory)
}
bool File::exists(const String &filename) {
- // FIXME: Ugly ugly hack!
- File tmp;
- return tmp.open(filename, kFileReadMode);
+ FilesystemNode file(filename);
+ return (file.isValid() && !file.isDirectory());
}
void File::close() {