diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-15 17:58:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-15 17:58:49 -0400 |
commit | 2ff051dd2173e773dfda5d1f0bf6c6b407705580 (patch) | |
tree | 8fec6aac8e2200b003944019c0be637ea877bd56 /Command | |
parent | 7f8b9d55099c15eaf33246c1d9ea2d4aa742abc1 (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')
-rw-r--r-- | Command/Drop.hs | 2 | ||||
-rw-r--r-- | Command/Move.hs | 2 |
2 files changed, 2 insertions, 2 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 diff --git a/Command/Move.hs b/Command/Move.hs index 316e4192e..20203c205 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -104,7 +104,7 @@ toPerform dest move key file = moveLock move key $ do Remote.logStatus dest key InfoPresent if move then do - whenM (inAnnex key) $ removeAnnex key + removeAnnex key next $ Command.Drop.cleanupLocal key else next $ return True |