mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
allow directory search to find files with the extension repeated twice
This commit is contained in:
@@ -467,7 +467,7 @@ std::vector<std::string> Client::DirectorySearch(std::string directory, std::str
|
|||||||
bool extensionMatch = !extensions.size();
|
bool extensionMatch = !extensions.size();
|
||||||
for(std::vector<std::string>::iterator extIter = extensions.begin(), extEnd = extensions.end(); extIter != extEnd; ++extIter)
|
for(std::vector<std::string>::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;
|
extensionMatch = true;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user