summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Watcher.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/Watcher.hs')
-rw-r--r--Assistant/Threads/Watcher.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index c41b17434..b20a8d4d7 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -222,9 +222,9 @@ onAddSymlink isdirect file filestatus = go =<< liftAnnex (Backend.lookupFile fil
ifM ((==) (Just link) <$> liftIO (catchMaybeIO $ readSymbolicLink file))
( ensurestaged (Just link) (Just key) =<< getDaemonStatus
, do
- unless isdirect $ do
- liftIO $ removeFile file
- liftAnnex $ Backend.makeAnnexLink link file
+ unless isdirect $
+ liftAnnex $ replaceFile file $
+ makeAnnexLink link
addLink file link (Just key)
)
go Nothing = do -- other symlink