From 1f722be0569057bd9337a7c91f17ba571ace144e Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sat, 22 Jan 2011 18:19:42 +0000 Subject: [PATCH] Add a hack to match the *.* wildcard in a file search on non windows platforms. This fixes Metroid Other M on linux, and probably other games. Fixes issue 3966. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6895 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/FileSearch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/Common/Src/FileSearch.cpp b/Source/Core/Common/Src/FileSearch.cpp index 63f5f82771..c60ce9beda 100644 --- a/Source/Core/Common/Src/FileSearch.cpp +++ b/Source/Core/Common/Src/FileSearch.cpp @@ -94,7 +94,8 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string& std::string s(dp->d_name); - if ( (s.size() > ext.size()) && (!strcasecmp(s.substr(s.size() - ext.size()).c_str(), ext.c_str())) ) + if ( (!ext.compare(".*") && s.compare(".") && s.compare("..")) || + ((s.size() > ext.size()) && (!strcasecmp(s.substr(s.size() - ext.size()).c_str(), ext.c_str())) )) { std::string full_name; if (_strPath.c_str()[_strPath.size()-1] == DIR_SEP_CHR)