-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Before deleting source files, we compare files by their os.stat() signature (filecmp.cmpfiles() with default shallow=True) here:
faim-robocopy/faim_robocopy/utils.py
Lines 52 to 54 in c03980f
| # and compare them (shallow). | |
| (matches, _, _) = filecmp.cmpfiles(current_dir, dest_dir, | |
| potential_matches) |
This should be enough to also catch mismatches in creation dates (such as the 1980-01-01 ones created by Robocopy on incomplete files), but needs to be tested. We might want to offer an additional layer of safety.
Since comparing the full file contents (shallow=False) might decrease the performance too much, let's consider offering an option to compare partial checksum (e.g. on the first 128 kb) for each file, as suggested by @enricotagliavini.
/cc @lgelman
Metadata
Metadata
Assignees
Labels
No labels