From 5e20dd85458807bc735cee01201440d8f4e04ecd Mon Sep 17 00:00:00 2001 From: jacob1 Date: Mon, 7 Jan 2013 17:39:05 -0500 Subject: [PATCH] allow directory search to find files with the extension repeated twice --- src/client/Client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 4c7ac4370..75e01ebf8 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -467,7 +467,7 @@ std::vector Client::DirectorySearch(std::string directory, std::str bool extensionMatch = !extensions.size(); for(std::vector::iterator extIter = extensions.begin(), extEnd = extensions.end(); extIter != extEnd; ++extIter) { - if(filename.find(*extIter)==filename.length()-(*extIter).length()) + if(filename.find(*extIter, filename.length()-(*extIter).length())==filename.length()-(*extIter).length()) { extensionMatch = true; break;