aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/scumm.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 365e3d4e56..18f746f73c 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -2678,13 +2678,15 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
// Iterate over all files in the given directory
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- const char *name = file->displayName().c_str();
-
- if (0 == scumm_stricmp(detectName, name)) {
- // Match found, add to list of candidates, then abort inner loop.
- detectedGames.push_back(g->toGameSettings());
- fileSet.addKey(file->path());
- break;
+ if (!file->isDirectory()) {
+ const char *name = file->displayName().c_str();
+
+ if (0 == scumm_stricmp(detectName, name)) {
+ // Match found, add to list of candidates, then abort inner loop.
+ detectedGames.push_back(g->toGameSettings());
+ fileSet.addKey(file->path());
+ break;
+ }
}
}
}