diff options
Diffstat (limited to 'Annex/Link.hs')
-rw-r--r-- | Annex/Link.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Annex/Link.hs b/Annex/Link.hs index 650fc19a1..931836d31 100644 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -60,7 +60,9 @@ getAnnexLinkTarget file = do -} makeAnnexLink :: LinkTarget -> FilePath -> Annex () makeAnnexLink linktarget file = ifM (coreSymlinks <$> Annex.getGitConfig) - ( liftIO $ createSymbolicLink linktarget file + ( liftIO $ do + void $ tryIO $ removeFile file + createSymbolicLink linktarget file , liftIO $ writeFile file linktarget ) |