Do not add empty matches to matches_all.
This commit is contained in:
parent
21989aabfe
commit
6a4511099f
|
@ -150,8 +150,11 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
auto matches{
|
auto matches{
|
||||||
search::search(filepath, regex, search_settings)};
|
search::search(filepath, regex, search_settings)};
|
||||||
std::lock_guard<std::mutex> guard(mutex_matches_all);
|
if (!matches.empty())
|
||||||
matches_all.emplace_back(matches);
|
{
|
||||||
|
std::lock_guard<std::mutex> guard(mutex_matches_all);
|
||||||
|
matches_all.emplace_back(matches);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (const zip::exception &e)
|
catch (const zip::exception &e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user