Skip to content

min_file_size hides files from the whole report, not just dedup #47

Description

@Muawiya-contact

ScanOptions::min_file_size is documented as // skip tiny files for dedup purposes, but it's applied inside the walk:

let size = meta.len();
if size < opts.min_file_size {
    continue;
}

So filtered files never reach the rules engine, the risk model, the report, or files_scanned — not just dedup. With the default of 1 that quietly drops every zero-byte file. Anyone raising it to speed dedup up (say 1 MB) would also hide every small cache file from classification, which isn't what the field says it does.

Either move the check into dedup::find_duplicates where it was meant to live, or rename the field to reflect that it filters the whole scan.

crates/diskern-core/src/scanner.rs:105

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersrustPull requests that update rust code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions