Windows: Fix deletion of repositories by test suite and webapp.
On Windows, a file that is not writable cannot be deleted even if in a directory with write perms. So git object files were not getting deleted when removing a git repository.
This commit is contained in:
parent
01df5ed31d
commit
29bb04aa0d
3 changed files with 10 additions and 12 deletions
|
@ -96,12 +96,10 @@ deleteCurrentRepository = dangerPage $ do
|
|||
rs <- syncRemotes <$> getDaemonStatus
|
||||
mapM_ (\r -> changeSyncable (Just r) False) rs
|
||||
|
||||
{- Make all directories writable, so all annexed
|
||||
- content can be deleted. -}
|
||||
{- Make all directories writable and files writable
|
||||
- so all annexed content can be deleted. -}
|
||||
liftIO $ do
|
||||
recurseDir SystemFS dir >>=
|
||||
filterM doesDirectoryExist >>=
|
||||
mapM_ allowWrite
|
||||
recurseDir SystemFS dir >>= mapM_ allowWrite
|
||||
removeDirectoryRecursive dir
|
||||
|
||||
redirect ShutdownConfirmedR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue