From e8c67bda4b1ac85ee4555247e30eb1b65e408055 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 21 Nov 2009 20:19:15 +0000 Subject: Change Archive::listMatchingMembers to match the pattern case-insensitively. svn-id: r46046 --- common/archive.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'common') 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++; } -- cgit v1.2.3