aboutsummaryrefslogtreecommitdiff
path: root/common/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/file.cpp')
-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()