summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-27 15:00:26 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-27 15:00:26 -0400
commit8810e57995f78876d5eb2b5429272d884c5e25c2 (patch)
treee2531ef29fd1f99b3ff0c99903914d17f7ac636e /Command
parentabd36ed33659f9b0b369c6d2510455365a943e3c (diff)
fix file name
Diffstat (limited to 'Command')
-rw-r--r--Command/Sync.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Command/Sync.hs b/Command/Sync.hs
index 8ac039943..759afed82 100644
--- a/Command/Sync.hs
+++ b/Command/Sync.hs
@@ -202,22 +202,23 @@ resolveMerge' u
where
go keyUs keyThem
| keyUs == keyThem = do
- makelink keyUs (file ++ "." ++ show keyUs)
+ makelink keyUs
return True
| otherwise = do
void $ liftIO $ tryIO $ removeFile file
Annex.Queue.addCommand "rm" [Params "--quiet -f --"] [file]
- makelink keyUs (file ++ "." ++ show keyUs)
- makelink keyThem (file ++ "." ++ show keyThem)
+ makelink keyUs
+ makelink keyThem
return True
file = LsFiles.unmergedFile u
issymlink select = any (select (LsFiles.unmergedBlobType u) ==)
[Just SymlinkBlob, Nothing]
- makelink (Just key) f = do
- l <- calcGitLink file key
- liftIO $ createSymbolicLink l f
- Annex.Queue.addCommand "add" [Param "--force", Param "--"] [f]
- makelink _ _ = noop
+ makelink (Just key) = do
+ let dest = file ++ "." ++ show key
+ l <- calcGitLink dest key
+ liftIO $ createSymbolicLink l dest
+ Annex.Queue.addCommand "add" [Param "--force", Param "--"] [dest]
+ makelink _ = noop
withKey select a = do
let msha = select $ LsFiles.unmergedSha u
case msha of