diff --git a/Command/Sync.hs b/Command/Sync.hs index 066a12a566..d6f1022cca 100644 --- a/Command/Sync.hs +++ b/Command/Sync.hs @@ -28,6 +28,7 @@ import qualified Types.Remote import qualified Remote.Git import Types.Key import Config +import Annex.ReplaceFile import Data.Hash.MD5 @@ -270,8 +271,7 @@ resolveMerge' u makelink (Just key) = do let dest = mergeFile file key l <- inRepo $ gitAnnexLink dest key - liftIO $ nukeFile dest - addAnnexLink l dest + replaceFile dest $ addAnnexLink l whenM (isDirect) $ toDirect key dest makelink _ = noop