aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Drop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-23 16:37:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-23 16:44:02 -0400
commit5112650348f6bf04cebe1fb97ed900b24e4aaac1 (patch)
tree4e207b96021812213d237e68d156e2e0bbdf32c3 /Assistant/Drop.hs
parent425c6ddfcd84b6bf26f3a277d010df1fb6b018da (diff)
fix transfers of key with no associated file
Several places assumed this would not happen, and when the AssociatedFile was Nothing, did nothing. As part of this, preferred content checks pass the Key around. Note that checkMatcher is sometimes now called with Just Key and Just File. It currently constructs a FileMatcher, ignoring the Key. However, if it constructed a FileKeyMatcher, which contained both, then it might be possible to speed up parts of Limit, which currently call the somewhat expensive lookupFileKey to get the Key. I have not made this optimisation yet, because I am not sure if the key is always the same. Will need some significant checking to satisfy myself that's the case..
Diffstat (limited to 'Assistant/Drop.hs')
-rw-r--r--Assistant/Drop.hs1
1 files changed, 0 insertions, 1 deletions
diff --git a/Assistant/Drop.hs b/Assistant/Drop.hs
index 3020b0f4f..faff37a23 100644
--- a/Assistant/Drop.hs
+++ b/Assistant/Drop.hs
@@ -19,7 +19,6 @@ import RunCommand
{- Drop from local and/or remote when allowed by the preferred content and
- numcopies settings. -}
handleDrops :: Reason -> Bool -> Key -> AssociatedFile -> Maybe Remote -> Assistant ()
-handleDrops _ _ _ Nothing _ = noop
handleDrops reason fromhere key f knownpresentremote = do
syncrs <- syncDataRemotes <$> getDaemonStatus
locs <- liftAnnex $ loggedLocations key