summaryrefslogtreecommitdiff
path: root/Remote/GCrypt.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-03 20:21:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-03 20:21:46 -0400
commit1b54fbff16a523f1b68248be37623c8d20b2fc7e (patch)
tree92c8114f40987aa6eb8d3c47f0a7a56993465461 /Remote/GCrypt.hs
parent6f34a7c9762a94befddc80dbdd898c2f5b6407f7 (diff)
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.
Diffstat (limited to 'Remote/GCrypt.hs')
-rw-r--r--Remote/GCrypt.hs8
1 files changed, 7 insertions, 1 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