Add find in files filter excluding ability
Filter usage example: *.* !*.exe !*.obj !*.log Close #7618, close #7626
This commit is contained in:
parent
f780e22d61
commit
dc48cee5f7
@ -973,12 +973,21 @@ bool str2Clipboard(const generic_string &str2cpy, HWND hwnd)
|
|||||||
|
|
||||||
bool matchInList(const TCHAR *fileName, const std::vector<generic_string> & patterns)
|
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)
|
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()))
|
if (PathMatchSpec(fileName, patterns[i].c_str()))
|
||||||
return true;
|
is_matched = true;
|
||||||
}
|
}
|
||||||
return false;
|
return is_matched;
|
||||||
}
|
}
|
||||||
|
|
||||||
generic_string GetLastErrorAsString(DWORD errorCode)
|
generic_string GetLastErrorAsString(DWORD errorCode)
|
||||||
|
Loading…
Reference in New Issue
Block a user