aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2007-09-01 21:22:26 +0000
committerEugene Sandulenko2007-09-01 21:22:26 +0000
commit41e72bfaaff114ceb68e3f377ea70ac75874f92f (patch)
treef1407b0578099def43db20d494a1b2e09228da81
parentbcabdc6caab957463dfe1eae0a3b02f17175cc2b (diff)
downloadscummvm-rg350-41e72bfaaff114ceb68e3f377ea70ac75874f92f.tar.gz
scummvm-rg350-41e72bfaaff114ceb68e3f377ea70ac75874f92f.tar.bz2
scummvm-rg350-41e72bfaaff114ceb68e3f377ea70ac75874f92f.zip
Fix fallback detector
svn-id: r28808
-rw-r--r--engines/agi/detection.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index 6be1573bc0..0213f84867 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -28,6 +28,7 @@
#include "base/plugins.h"
#include "common/advancedDetector.h"
+#include "common/config-manager.h"
#include "common/file.h"
#include "agi/agi.h"
@@ -1887,8 +1888,13 @@ Common::EncapsulatedADGameDesc fallbackDetector(const FSList *fslist) {
// Use the current directory for searching if fslist == NULL
if (fslist == NULL) {
- FilesystemNode fsCurrentDir(".");
- fslistCurrentDir.push_back(fsCurrentDir);
+ Common::String path = ConfMan.get("path").c_str();
+
+ if (path.empty())
+ path = ".";
+
+ FilesystemNode fsCurrentDir(path);
+ fsCurrentDir.listDir(fslistCurrentDir, FilesystemNode::kListFilesOnly);
fslist = &fslistCurrentDir;
}