fix kevent symlink creation

This commit is contained in:
Joey Hess 2012-06-19 02:40:21 -04:00
parent 4ab9449cee
commit 57cf65eb6d
6 changed files with 83 additions and 57 deletions

View file

@ -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