From 0d7ab01640a2209167272936c624c32142131993 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Thu, 9 Dec 2004 15:06:49 +0000 Subject: Pass subdirectories to gamedetector functions svn-id: r16002 --- scumm/scumm.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'scumm') 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; + } } } } -- cgit v1.2.3