From 189350419e0775e4175aa860326c5ce62a974d59 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 4 Aug 2013 13:39:31 -0400 Subject: Windows: Fixed permissions problem that prevented removing files from directory special remote. Directory special remotes now fully usable. --- Remote/Directory.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Remote') 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 -- cgit v1.2.3