From 2ed777d64137226cd0ccc5a13b10f9ab9ea14965 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Sep 2007 23:07:27 +0000 Subject: Fixes Common::File::exists. Please see the added FIXME comment about the real problem. svn-id: r28952 --- common/file.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/file.cpp b/common/file.cpp index 2c485627bb..4d6fd5a69f 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -444,7 +444,13 @@ bool File::exists(const String &filename) { // path was passed). But we only use this to filter out directories. FilesystemNode file(filename); - return (!file.isDirectory() && file.exists()); + // FIXME: since (as stated in the comment above) FilesystemNode creation + // just works for absolute paths, and we use this to tell if a file + // exsists in any of the setup paths we can't use: + //return (!file.isDirectory() && file.exists()); + // if file.exsits() fails + if (file.exists()) + return !file.isDirectory(); //***DEPRECATED COMMENTS BELOW, LEFT FOR DISCUSSION*** // Next, try to locate the file by *opening* it in read mode. This has -- cgit v1.2.3