fix(scanner): visit compacted subtrees during deep scans (#7270)

Co-authored-by: heihutu <heihutu@gmail.com>
Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
houseme
2026-09-06 16:45:17 +08:00
committed by GitHub
parent 3a4afe9b38
commit cb3100a252
3 changed files with 211 additions and 1 deletions
+6 -1
View File
@@ -1832,7 +1832,12 @@ impl FolderScanner {
}
}
FolderScanSource::Existing => {
if !forward_sweep && !into.compacted && self.old_cache.is_compacted(&h) {
// Usage sampling is not proof that a Deep check ran.
if self.scan_mode != HealScanMode::Deep
&& !forward_sweep
&& !into.compacted
&& self.old_cache.is_compacted(&h)
{
let next_cycle = self.old_cache.info.next_cycle as u32;
if !h.mod_(next_cycle, data_usage_update_dir_cycles()) {
// Transfer and add as child...