From 036e88d382f653fd8590bb2edec2e45072f9d0be Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 7 Nov 2010 17:16:01 +0000 Subject: DETECTOR: Don't compute mac resource fork MD5 of a file multiple times Also add a FIXME regarding the fact that we don't handle the case that a file is listed as a regular file and as one with resource fork. svn-id: r54120 --- engines/advancedDetector.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp index e030cba72a..d48fd61118 100644 --- a/engines/advancedDetector.cpp +++ b/engines/advancedDetector.cpp @@ -449,6 +449,12 @@ static ADGameDescList detectGame(const Common::FSList &fslist, const ADParams &p Common::String fname = fileDesc->fileName; SizeMD5 tmp; + if (filesSizeMD5.contains(fname)) + continue; + + // FIXME/TODO: We don't handle the case that a file is listed as a regular + // file and as one with resource fork. + if (g->flags & ADGF_MACRESFORK) { Common::MacResManager *macResMan = new Common::MacResManager(); @@ -462,7 +468,7 @@ static ADGameDescList detectGame(const Common::FSList &fslist, const ADParams &p delete macResMan; } else { - if (allFiles.contains(fname) && !filesSizeMD5.contains(fname)) { + if (allFiles.contains(fname)) { debug(3, "+ %s", fname.c_str()); Common::File testFile; -- cgit v1.2.3