diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index 4eac622f92..38c5c138f3 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -206,8 +206,9 @@ onAddSymlink isdirect file filestatus = go =<< liftAnnex (Backend.lookupFile fil checkcontent key s ensurestaged (Just link) s , do - liftIO $ removeFile file - liftAnnex $ Backend.makeAnnexLink link file + unless isdirect $ do + liftIO $ removeFile file + liftAnnex $ Backend.makeAnnexLink link file checkcontent key =<< getDaemonStatus addlink link )