summaryrefslogtreecommitdiff
path: root/Command/Drop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-15 17:58:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-15 17:58:49 -0400
commit2ff051dd2173e773dfda5d1f0bf6c6b407705580 (patch)
tree8fec6aac8e2200b003944019c0be637ea877bd56 /Command/Drop.hs
parent7f8b9d55099c15eaf33246c1d9ea2d4aa742abc1 (diff)
proper fix for dropunused
Now getKeysPresent checks that the key's content, not only its directory, exists. In direct mode, the inode cache file is used as a standin for the content. removeAnnex always removes the inode cache file, and drop and move --from always call removeAnnex, even if the object does not seem to be inAnnex, to ensure it's always deleted.
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r--Command/Drop.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs
index f7491deae..1683f3b57 100644
--- a/Command/Drop.hs
+++ b/Command/Drop.hs
@@ -60,7 +60,7 @@ performLocal key numcopies knownpresentremote = lockContent key $ do
untrusteduuids <- trustGet UnTrusted
let tocheck = Remote.remotesWithoutUUID remotes (trusteduuids'++untrusteduuids)
stopUnless (canDropKey key numcopies trusteduuids' tocheck []) $ do
- whenM (inAnnex key) $ removeAnnex key
+ removeAnnex key
next $ cleanupLocal key
performRemote :: Key -> Maybe Int -> Remote -> CommandPerform