From 1b54fbff16a523f1b68248be37623c8d20b2fc7e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Aug 2014 20:21:46 -0400 Subject: fix removal from local gcrypt repo that had files stored using rsync When files are stored using rsync, they have their write bit removed; so does the directory they're put in. The local repo code did not turn these bits back on, so failed to remove. --- Remote/GCrypt.hs | 8 +++++++- debian/changelog | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs index b2df7d56a..db0144363 100644 --- a/Remote/GCrypt.hs +++ b/Remote/GCrypt.hs @@ -45,6 +45,7 @@ import Utility.Tmp import Logs.Remote import Logs.Transfer import Utility.Gpg +import Utility.FileMode remote :: RemoteType remote = RemoteType { @@ -325,7 +326,12 @@ retrieve r rsyncopts remove :: Remote -> Remote.Rsync.RsyncOpts -> Key -> Annex Bool remove r rsyncopts k | not $ Git.repoIsUrl (repo r) = guardUsable (repo r) False $ do - liftIO $ removeDirectoryRecursive $ parentDir $ gCryptLocation r k + let f = gCryptLocation r k + let d = parentDir f + liftIO $ do + allowWrite d + allowWrite f + removeDirectoryRecursive d return True | Git.repoIsSsh (repo r) = shellOrRsync r removeshell removersync | otherwise = unsupportedUrl diff --git a/debian/changelog b/debian/changelog index a6118966e..8da5b87bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,7 +21,6 @@ git-annex (5.20140718) UNRELEASED; urgency=medium * Dropping an object from a bup special remote now deletes the git branch for the object, although of course the object's content cannot be deleted due to the nature of bup. - * -- Joey Hess Mon, 21 Jul 2014 14:41:26 -0400 -- cgit v1.2.3