summaryrefslogtreecommitdiff
path: root/test.hs
diff options
context:
space:
mode:
Diffstat (limited to 'test.hs')
-rw-r--r--test.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/test.hs b/test.hs
index f7d3f7c53..b68360e9d 100644
--- a/test.hs
+++ b/test.hs
@@ -20,6 +20,8 @@ import Control.Exception (throw)
import Control.Monad.State (liftIO)
import Maybe
import qualified Data.Map as M
+import System.Path (recurseDir)
+import System.IO.HVFS (SystemFS(..))
import qualified Annex
import qualified BackendList
@@ -536,8 +538,12 @@ cleanup dir = do
when e $ do
-- git-annex prevents annexed file content from being
-- removed via permissions bits; undo
- _ <- Utility.boolSystem "chmod" ["+rw", "-R", dir]
+ recurseDir SystemFS dir >>= mapM_ fixmodes
removeDirectoryRecursive dir
+ where
+ fixmodes f = do
+ s <- getSymbolicLinkStatus f
+ unless (isSymbolicLink s) $ Content.allowWrite f
checklink :: FilePath -> Assertion
checklink f = do