From f42bb14ea3f0c4e4801a026d6ff9cd881d0999df Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 26 Apr 2006 08:13:25 +0000 Subject: Commited *correct* File::exists reimplementation (compared to my incomplete previous commit. Aargh) svn-id: r22170 --- common/file.cpp | 5 ++--- 1 file 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() { -- cgit v1.2.3