aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {