verify associated files when checking numcopies
authorJoey Hess <joeyh@joeyh.name>
Tue, 15 Jun 2021 15:12:27 +0000 (11:12 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 15 Jun 2021 15:14:52 +0000 (11:14 -0400)
commitaf9fdf5dba888905f15c888ac2d4bad2406361c9
tree5941dc6a14a741584d5e1df472663c17222c807a
parentd164434679f959292cc6208edd7bed8ce8b95ada
verify associated files when checking numcopies

Most of this is just refactoring. But, handleDropsFrom
did not verify that associated files from the keys db were still
accurate, and has now been fixed to.

A minor improvement to this would be to avoid calling catKeyFile
twice on the same file, when getting the numcopies and mincopies value,
in the common case where the same file has the highest value for both.
But, it avoids checking every associated file, so it will scale well to
lots of dups already.

Sponsored-by: Kevin Mueller on Patreon
Annex/Drop.hs
Annex/NumCopies.hs
CHANGELOG
Database/Keys.hs
doc/todo/numcopies_check_other_files_using_same_key.mdwn