mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-06 01:25:20 +00:00
Fix loading of YARA rules on Windows (#6893)
Make the relative filepath check cross-platform. Fixes #6788
This commit is contained in:
parent
8fd470ca92
commit
c93fefb7f1
@ -212,7 +212,7 @@ Status handleRuleFiles(const std::string& category,
|
||||
|
||||
YR_RULES* tmp_rules = nullptr;
|
||||
std::string rule = item.GetString();
|
||||
if (rule[0] != '/') {
|
||||
if (boost::filesystem::path(rule).is_relative()) {
|
||||
rule = kYARAHome + rule;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user