From 68887e79a08eeac891ecbbbf87d0c74c5dac1345 Mon Sep 17 00:00:00 2001 From: Igor Fedosov Date: Thu, 14 Jul 2022 17:02:35 +0300 Subject: [PATCH] Makes key inside Collection::getCollection use lowercase --- components/files/collections.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/files/collections.cpp b/components/files/collections.cpp index a933eb682c..6f8935d322 100644 --- a/components/files/collections.cpp +++ b/components/files/collections.cpp @@ -20,11 +20,12 @@ namespace Files const MultiDirCollection& Collections::getCollection(const std::string& extension) const { - MultiDirCollectionContainer::iterator iter = mCollections.find(extension); + std::string ext = Misc::StringUtils::lowerCase(extension); + MultiDirCollectionContainer::iterator iter = mCollections.find(ext); if (iter==mCollections.end()) { std::pair result = - mCollections.insert(std::make_pair(extension, MultiDirCollection(mDirectories, extension, mFoldCase))); + mCollections.insert(std::make_pair(ext, MultiDirCollection(mDirectories, ext, mFoldCase))); iter = result.first; }