use replaceWorkTreeFile when fixing an annex symlink
This does not change any behavior, but it's useful for all worktree changes to be made using this. Sponsored-by: Graham Spencer on Patreon
This commit is contained in:
parent
cfc65ee9fc
commit
af1a45c69c
2 changed files with 6 additions and 7 deletions
|
@ -97,11 +97,11 @@ fixSymlink file link = do
|
|||
mtime <- liftIO $ catchMaybeIO $ Posix.modificationTimeHiRes
|
||||
<$> R.getSymbolicLinkStatus file
|
||||
#endif
|
||||
createWorkTreeDirectory (parentDir file)
|
||||
liftIO $ R.removeLink file
|
||||
liftIO $ R.createSymbolicLink link file
|
||||
replaceWorkTreeFile (fromRawFilePath file) $ \tmpfile -> do
|
||||
let tmpfile' = toRawFilePath tmpfile
|
||||
liftIO $ R.createSymbolicLink link tmpfile'
|
||||
#if ! defined(mingw32_HOST_OS)
|
||||
liftIO $ maybe noop (\t -> touch file t False) mtime
|
||||
liftIO $ maybe noop (\t -> touch tmpfile' t False) mtime
|
||||
#endif
|
||||
stageSymlink file =<< hashSymlink link
|
||||
next $ return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue