diff options
author | Joey Hess <joey@kitenet.net> | 2011-02-09 00:12:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-02-09 00:12:45 -0400 |
commit | 7a0826293e0ac6c0000f49a1618c1c613b909aa1 (patch) | |
tree | 77d24395cab6321dff8014c76b6413284b7e03bc | |
parent | de1e33010232a8abad59a54758ec00808caa8a5c (diff) |
test: Don't rely on chmod -R working.
Sometimes I wish I could give all my users a real OS.
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | test.hs | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index b8d27f77e..52a749178 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 * Preserve specified file ordering when instructed to act on multiple @@ -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 |