fix reversion on repo deletion
A broken symlink would cause the mode setting to fail.
This commit is contained in:
parent
ec417b108d
commit
c91bbc9494
2 changed files with 3 additions and 2 deletions
|
@ -99,7 +99,8 @@ deleteCurrentRepository = dangerPage $ do
|
||||||
{- Make all directories writable and files writable
|
{- Make all directories writable and files writable
|
||||||
- so all annexed content can be deleted. -}
|
- so all annexed content can be deleted. -}
|
||||||
liftIO $ do
|
liftIO $ do
|
||||||
recurseDir SystemFS dir >>= mapM_ allowWrite
|
recurseDir SystemFS dir
|
||||||
|
>>= mapM_ (void . tryIO . allowWrite)
|
||||||
removeDirectoryRecursive dir
|
removeDirectoryRecursive dir
|
||||||
|
|
||||||
redirect ShutdownConfirmedR
|
redirect ShutdownConfirmedR
|
||||||
|
|
2
Test.hs
2
Test.hs
|
@ -1178,7 +1178,7 @@ cleanup' final dir = whenM (doesDirectoryExist dir) $ do
|
||||||
-- they can be deleted. Both git and git-annex use file
|
-- they can be deleted. Both git and git-annex use file
|
||||||
-- permissions to prevent deletion.
|
-- permissions to prevent deletion.
|
||||||
recurseDir SystemFS dir >>=
|
recurseDir SystemFS dir >>=
|
||||||
mapM_ Utility.FileMode.allowWrite
|
mapM_ (void . tryIO . Utility.FileMode.allowWrite)
|
||||||
-- This sometimes fails on Windows, due to some files
|
-- This sometimes fails on Windows, due to some files
|
||||||
-- being still opened by a subprocess.
|
-- being still opened by a subprocess.
|
||||||
catchIO (removeDirectoryRecursive dir) $ \e -> do
|
catchIO (removeDirectoryRecursive dir) $ \e -> do
|
||||||
|
|
Loading…
Add table
Reference in a new issue