summaryrefslogtreecommitdiff
path: root/Assistant/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-20 20:08:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-20 20:13:47 -0400
commit28ac29b518a49363788b3607130cee5aff5534e9 (patch)
tree25985e4f7937c64e662ef5447651f4e44d2b9cbf /Assistant/Unused.hs
parent6f8f6b7dde108168ac5a9f0b3fb2cb8ea2d2f60c (diff)
use types to enforce that removeAnnex can only be called inside lockContent
This fixed one bug where it needed to be and wasn't (in Assistant.Unused). And also found one place where lockContent was used unnecessarily (by drop --from remote). A few other places like uninit probably don't really need to lockContent, but it doesn't hurt to do call it anyway. This commit was sponsored by David Wagner.
Diffstat (limited to 'Assistant/Unused.hs')
-rw-r--r--Assistant/Unused.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Assistant/Unused.hs b/Assistant/Unused.hs
index 3ad98c12e..c2c10b048 100644
--- a/Assistant/Unused.hs
+++ b/Assistant/Unused.hs
@@ -77,7 +77,7 @@ expireUnused duration = do
forM_ oldkeys $ \k -> do
debug ["removing old unused key", key2file k]
liftAnnex $ do
- removeAnnex k
+ lockContent k removeAnnex
logStatus k InfoMissing
where
boundry = durationToPOSIXTime <$> duration