aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2007-09-18 23:07:27 +0000
committerJohannes Schickel2007-09-18 23:07:27 +0000
commit2ed777d64137226cd0ccc5a13b10f9ab9ea14965 (patch)
treead1be2635c7a2207ce79198bc83d9df2bcd90a59
parentd6dbb98bc9770fc3af3fc0ef3c4792047f3c689c (diff)
downloadscummvm-rg350-2ed777d64137226cd0ccc5a13b10f9ab9ea14965.tar.gz
scummvm-rg350-2ed777d64137226cd0ccc5a13b10f9ab9ea14965.tar.bz2
scummvm-rg350-2ed777d64137226cd0ccc5a13b10f9ab9ea14965.zip
Fixes Common::File::exists. Please see the added FIXME comment about the real problem.
svn-id: r28952
-rw-r--r--common/file.cpp8
1 files changed, 7 insertions, 1 deletions
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