aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
Diffstat (limited to 'sword2')
-rw-r--r--sword2/sword2.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/sword2/sword2.cpp b/sword2/sword2.cpp
index 27ce3e0ae3..82d7d0c0b7 100644
--- a/sword2/sword2.cpp
+++ b/sword2/sword2.cpp
@@ -80,12 +80,14 @@ DetectedGameList Engine_SWORD2_detectGames(const FSList &fslist) {
for (g = sword2_settings; g->name; ++g) {
// Iterate over all files in the given directory
for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) {
- const char *gameName = file->displayName().c_str();
+ if (!file->isDirectory()) {
+ const char *gameName = file->displayName().c_str();
- if (0 == scumm_stricmp(g->detectname, gameName)) {
- // Match found, add to list of candidates, then abort inner loop.
- detectedGames.push_back(g->toGameSettings());
- break;
+ if (0 == scumm_stricmp(g->detectname, gameName)) {
+ // Match found, add to list of candidates, then abort inner loop.
+ detectedGames.push_back(g->toGameSettings());
+ break;
+ }
}
}
}