mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fixed bug in logic for including/excluding files for script optimization
This commit is contained in:
parent
0700427bac
commit
fada719620
1 changed files with 5 additions and 2 deletions
|
@ -160,15 +160,18 @@ AnalyzeDecision filename_matches_opt_files(const char* filename) {
|
||||||
|
|
||||||
auto fin = util::detail::normalize_path(filename);
|
auto fin = util::detail::normalize_path(filename);
|
||||||
|
|
||||||
for ( auto& s : analysis_options.skip_files )
|
for ( auto& s : sfiles )
|
||||||
if ( std::regex_match(fin, s) )
|
if ( std::regex_match(fin, s) )
|
||||||
return AnalyzeDecision::SHOULD_NOT;
|
return AnalyzeDecision::SHOULD_NOT;
|
||||||
|
|
||||||
|
if ( ofiles.empty() )
|
||||||
|
return AnalyzeDecision::DEFAULT;
|
||||||
|
|
||||||
for ( auto& o : ofiles )
|
for ( auto& o : ofiles )
|
||||||
if ( std::regex_match(fin, o) )
|
if ( std::regex_match(fin, o) )
|
||||||
return AnalyzeDecision::SHOULD;
|
return AnalyzeDecision::SHOULD;
|
||||||
|
|
||||||
return AnalyzeDecision::DEFAULT;
|
return AnalyzeDecision::SHOULD_NOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
AnalyzeDecision obj_matches_opt_files(const Obj* obj) {
|
AnalyzeDecision obj_matches_opt_files(const Obj* obj) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue