keep original file info in file-walker and make sure changed files are processed properly

This commit is contained in:
2026-06-28 14:33:41 +02:00
parent d155841744
commit b1b593896a
3 changed files with 24 additions and 18 deletions
+8 -4
View File
@@ -85,15 +85,19 @@
((eq? in-db #f)
(hash-set! info 'file-db 'new)
(hash-set! db-hash normalized-sub-path info)
(values base-path path info)
)
(else
(if (file-info-equal? info in-db)
(hash-set! info 'file-db 'unchanged)
(hash-set! info 'file-db 'changed))
(hash-set! db-hash normalized-sub-path info)
(hash-set! in-db 'file-db 'unchanged)
(begin
(hash-set! in-db 'file-db 'changed)
(hash-set! in-db 'size (hash-ref info 'size))
(hash-set! in-db 'mtime (hash-ref info 'mtime))))
(hash-set! db-hash normalized-sub-path in-db)
(values base-path path in-db)
)
)
(values base-path path info)
))
(define (init-db-sweep)