Add find in files filter excluding ability

Filter usage example:
*.* !*.exe !*.obj !*.log

Close #7618, close #7626
This commit is contained in:
Ale 2019-11-20 08:59:43 +00:00 committed by Don HO
parent f780e22d61
commit dc48cee5f7
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -973,12 +973,21 @@ bool str2Clipboard(const generic_string &str2cpy, HWND hwnd)
bool matchInList(const TCHAR *fileName, const std::vector<generic_string> & patterns)
{
bool is_matched = false;
for (size_t i = 0, len = patterns.size(); i < len; ++i)
{
if (patterns[i].length() > 1 && patterns[i][0] == '!')
{
if (PathMatchSpec(fileName, patterns[i].c_str() + 1))
return false;
continue;
}
if (PathMatchSpec(fileName, patterns[i].c_str()))
return true;
is_matched = true;
}
return false;
return is_matched;
}
generic_string GetLastErrorAsString(DWORD errorCode)