diff options
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Directory.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index adf2c09dc..6cc75d2f1 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -231,6 +231,11 @@ retrieveCheap _ _ _ _ = return False remove :: FilePath -> Key -> Annex Bool remove d k = liftIO $ do void $ tryIO $ allowWrite dir +#ifdef mingw32_HOST_OS + {- Windows needs the files inside the directory to be writable + - before it can delete them. -} + void $ tryIO $ mapM_ allowWrite =<< dirContents dir +#endif catchBoolIO $ do removeDirectoryRecursive dir return True |