From 57cf65eb6d811ba7fd19eb62a54e3b83a0c2dfa7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 19 Jun 2012 02:40:21 -0400 Subject: fix kevent symlink creation --- Command/Add.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Command/Add.hs') 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 -- cgit v1.2.3