Comment 0 for bug 1815592

Revision history for this message
Ɓukasz Zemczak (sil2100) wrote :

The bin/checksum-directory script is intended to create checksums of all images in a given directory. The script itself offers a functionality of adding additional 'old directories' where it should look for existing checksums for images in the new directory and try re-using those - instead of re-checksumming the files all over again (to save time). This doesn't seem to work.

The checksum-directory merging of checksums works in such a way that each entry in the current directory is checked to see if it can be re-used from one of the olddirs. First there's a check for symlinks. If the entry is not a symlink, then the next method of 'checking' is checking the timestamps of the files. The current design of the timestamp checking makes it basically impossible to re-use checksums from other directories though.

Each file is checked for max(st.st_mtime, st.st_ctime) and then compared (entry_time > dir_time). Every move, hard-link or copy operation of an image file modifies at least one of the timestamps, resulting in checksum-directory not considering re-using the checksum.