diff options
author | Joey Hess <joey@kitenet.net> | 2012-06-19 02:40:21 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-06-19 02:40:21 -0400 |
commit | 57cf65eb6d811ba7fd19eb62a54e3b83a0c2dfa7 (patch) | |
tree | 7711cef2d303fc485185f636c0e364e4f9cee0c5 /Command | |
parent | 4ab9449cee0cb1377a768b44fe832282ac1f88b9 (diff) |
fix kevent symlink creation
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Add.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Command/Add.hs b/Command/Add.hs index 7a6696063..43f186fbf 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -97,8 +97,8 @@ undo file key e = do src <- inRepo $ gitAnnexLocation key liftIO $ moveFile src file -{- Creates the symlink to the annexed content. -} -link :: FilePath -> Key -> Bool -> Annex () +{- Creates the symlink to the annexed content, returns the link target. -} +link :: FilePath -> Key -> Bool -> Annex String link file key hascontent = handle (undo file key) $ do l <- calcGitLink file key liftIO $ createSymbolicLink l file @@ -112,6 +112,8 @@ link file key hascontent = handle (undo file key) $ do mtime <- modificationTime <$> getFileStatus file touch file (TimeSpec mtime) False + return l + {- Note: Several other commands call this, and expect it to - create the symlink and add it. -} cleanup :: FilePath -> Key -> Bool -> CommandCleanup |