mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-21 20:18:06 +02:00
Add max_file_size_mb and high_only logic to scanning process:
- Implement `max_file_size_mb` to restrict files for scanning based on size. - Refactor `high_only` handling to modify `min_severity` in `Config`. - Update `ScannerConfig` to use `Option<u64>` for optional size limits. - Remove redundant `high_only` parameter from `scan::handle` function. - Improve batch processing in `walk` for efficient file scanning.
This commit is contained in:
parent
b3e0db449d
commit
80c0bc9845
6 changed files with 47 additions and 15 deletions
|
|
@ -53,9 +53,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
let database_dir = proj_dirs.data_local_dir();
|
||||
fs::create_dir_all(database_dir)?;
|
||||
|
||||
let config = Config::load(config_dir)?;
|
||||
let mut config = Config::load(config_dir)?;
|
||||
|
||||
commands::handle_command(cli.command, database_dir, &config)?;
|
||||
commands::handle_command(cli.command, database_dir, &mut config)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue