mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Refactor search_for_file() util function.
It was getting too bloated and allocated memory in ways that were difficult to understand how to manage. Separated out primarily in to new find_file() and open_file()/open_package() functions. Also renamed other util functions for path-related things.
This commit is contained in:
parent
68227f112d
commit
90477df973
9 changed files with 331 additions and 304 deletions
|
@ -226,7 +226,7 @@ bool RuleMatcher::ReadFiles(const name_list& files)
|
|||
|
||||
for ( int i = 0; i < files.length(); ++i )
|
||||
{
|
||||
rules_in = search_for_file(files[i], "sig", 0, false, 0);
|
||||
rules_in = open_file(find_file(files[i], bro_path(), "sig"));
|
||||
if ( ! rules_in )
|
||||
{
|
||||
reporter->Error("Can't open signature file %s", files[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue