fix missing call to check after hard linking

This could perhaps have caused a hard link to be made when the content
of the object was modified. I don't think that actually happened,
because the annexed file would have to be unlocked, with annex.thin, for
the object to get modified, and in that case, a hard link is not made.
However, to be sure, run the check.

Note that it seemed best to run the check only once, although the
current implementation is fast and safe to run repeatedly.
This commit is contained in:
Joey Hess 2021-02-10 13:05:35 -04:00
parent f08d7688e9
commit 1c75364eac
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -884,7 +884,10 @@ mkCopier remotewanthardlink st rsyncparams = do
if remotewanthardlink || localwanthardlink
then return $ \src dest p check ->
ifM (liftIO (catchBoolIO (linker src dest)))
( return (True, Verified)
( ifM check
( return (True, Verified)
, return (False, UnVerified)
)
, copier src dest p check
)
else return copier