fix kevent symlink creation
This commit is contained in:
parent
4ab9449cee
commit
57cf65eb6d
6 changed files with 83 additions and 57 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue