Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly handle directories for local files
When loading local files and rule files are nested in a folder, the current behavior prepends the base path and not the nested path which results in a file not found error. This change updates this to use the `dirpath` parameter from `os.walk` so that it is handled correctly. Given a structure of /tmp/rules/ ├── file1.rules └── nested └── file2.rules Today it would try to load this as the following * /tmp/rules/file1.rules * /tmp/rules/file2.rules With the fix this would be * /tmp/rules/file1.rules * /tmp/rules/nested/file2.rules Signed-off-by: Ben Magistro <[email protected]>
- Loading branch information