aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-10-27 02:30:29 +0000
committerJohannes Schickel2008-10-27 02:30:29 +0000
commitfb9bd9f44202e573629a27ade7807a0e1a043265 (patch)
tree97796b4c36c678cdf1cde49ee2367c5dbe8e68e2
parentea8e06fcf9d865b83465ee704b3a8c4cc11055df (diff)
downloadscummvm-rg350-fb9bd9f44202e573629a27ade7807a0e1a043265.tar.gz
scummvm-rg350-fb9bd9f44202e573629a27ade7807a0e1a043265.tar.bz2
scummvm-rg350-fb9bd9f44202e573629a27ade7807a0e1a043265.zip
Fix for bug #2198456 "FS: Cannot add a subfolder to a non-existing folder".
svn-id: r34857
-rw-r--r--common/file.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/file.cpp b/common/file.cpp
index abb2cda494..76a9f94505 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -37,7 +37,8 @@ void File::addDefaultDirectory(const String &directory) {
}
void File::addDefaultDirectory(const FSNode &dir) {
- SearchMan.addDirectory(dir.getPath(), dir);
+ if (dir.exists() && dir.isDirectory())
+ SearchMan.addDirectory(dir.getPath(), dir);
}
File::File()