summaryrefslogtreecommitdiff
path: root/Command/Sync.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Sync.hs')
-rw-r--r--Command/Sync.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 066a12a56..d6f1022cc 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