diff options
author | 2013-05-25 18:37:56 -0400 | |
---|---|---|
committer | 2013-05-25 18:42:43 -0400 | |
commit | 588a981e17461643b67f9a372703b9e0896b6e17 (patch) | |
tree | 603d4ac50580573d50efcc27abc3c62018da8432 /Command | |
parent | 9449cb5a1a9d8e53863421cacdf9a908516bbd18 (diff) |
fuzz test discovered a way automatic merge resultion can fail; fix
It may be that the directory we need to make a symlink in, to resolve the
merge, doesn't exist locally.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Sync.hs | 4 |
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 |