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 --- sky/sky.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sky') diff --git a/sky/sky.cpp b/sky/sky.cpp index 048044d43f..bf6b742e1f 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -90,12 +90,14 @@ DetectedGameList Engine_SKY_detectGames(const FSList &fslist) { DetectedGameList detectedGames; // Iterate over all files in the given directory for (FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { - const char *fileName = file->displayName().c_str(); + if (!file->isDirectory()) { + const char *fileName = file->displayName().c_str(); - if (0 == scumm_stricmp("sky.dsk", fileName)) { - // Match found, add to list of candidates, then abort inner loop. - detectedGames.push_back(skySetting); - break; + if (0 == scumm_stricmp("sky.dsk", fileName)) { + // Match found, add to list of candidates, then abort inner loop. + detectedGames.push_back(skySetting); + break; + } } } return detectedGames; -- cgit v1.2.3