test: Don't rely on chmod -R working.
Sometimes I wish I could give all my users a real OS.
This commit is contained in:
parent
de1e330102
commit
7a0826293e
2 changed files with 13 additions and 1 deletions
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
git-annex (0.21) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* test: Don't rely on chmod -R working.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Wed, 09 Feb 2011 00:12:11 -0400
|
||||||
|
|
||||||
git-annex (0.20) unstable; urgency=low
|
git-annex (0.20) unstable; urgency=low
|
||||||
|
|
||||||
* Preserve specified file ordering when instructed to act on multiple
|
* Preserve specified file ordering when instructed to act on multiple
|
||||||
|
|
8
test.hs
8
test.hs
|
@ -20,6 +20,8 @@ import Control.Exception (throw)
|
||||||
import Control.Monad.State (liftIO)
|
import Control.Monad.State (liftIO)
|
||||||
import Maybe
|
import Maybe
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
import System.Path (recurseDir)
|
||||||
|
import System.IO.HVFS (SystemFS(..))
|
||||||
|
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
import qualified BackendList
|
import qualified BackendList
|
||||||
|
@ -536,8 +538,12 @@ cleanup dir = do
|
||||||
when e $ do
|
when e $ do
|
||||||
-- git-annex prevents annexed file content from being
|
-- git-annex prevents annexed file content from being
|
||||||
-- removed via permissions bits; undo
|
-- removed via permissions bits; undo
|
||||||
_ <- Utility.boolSystem "chmod" ["+rw", "-R", dir]
|
recurseDir SystemFS dir >>= mapM_ fixmodes
|
||||||
removeDirectoryRecursive dir
|
removeDirectoryRecursive dir
|
||||||
|
where
|
||||||
|
fixmodes f = do
|
||||||
|
s <- getSymbolicLinkStatus f
|
||||||
|
unless (isSymbolicLink s) $ Content.allowWrite f
|
||||||
|
|
||||||
checklink :: FilePath -> Assertion
|
checklink :: FilePath -> Assertion
|
||||||
checklink f = do
|
checklink f = do
|
||||||
|
|
Loading…
Reference in a new issue