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:
parent
f08d7688e9
commit
1c75364eac
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue