diff options
author | Johannes Schickel | 2009-11-21 20:19:15 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-11-21 20:19:15 +0000 |
commit | e8c67bda4b1ac85ee4555247e30eb1b65e408055 (patch) | |
tree | 083c02f7e2f0b33314964c61430b2b3d9d251c1d /common | |
parent | aad8e8a2a218209e191f08b7ca415a0121d3f4d1 (diff) | |
download | scummvm-rg350-e8c67bda4b1ac85ee4555247e30eb1b65e408055.tar.gz scummvm-rg350-e8c67bda4b1ac85ee4555247e30eb1b65e408055.tar.bz2 scummvm-rg350-e8c67bda4b1ac85ee4555247e30eb1b65e408055.zip |
Change Archive::listMatchingMembers to match the pattern case-insensitively.
svn-id: r46046
Diffstat (limited to 'common')
-rw-r--r-- | common/archive.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/common/archive.cpp b/common/archive.cpp index 4f1385f2d8..2e2aca6b22 100644 --- a/common/archive.cpp +++ b/common/archive.cpp @@ -50,13 +50,11 @@ int Archive::listMatchingMembers(ArchiveMemberList &list, const String &pattern) int matches = 0; - // need to match lowercase key - String lowercasePattern = pattern; - lowercasePattern.toLowercase(); - ArchiveMemberList::iterator it = allNames.begin(); for ( ; it != allNames.end(); ++it) { - if ((*it)->getName().matchString(lowercasePattern, false, true)) { + // TODO: We match case-insenstivie for now, our API does not define whether that's ok or not though... + // For our use case case-insensitive is probably what we want to have though. + if ((*it)->getName().matchString(lowercasePattern, true, true)) { list.push_back(*it); matches++; } |