aboutsummaryrefslogtreecommitdiff
path: root/Assistant/Drop.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-10-08 16:55:11 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-10-08 16:55:11 -0400
commitd5494842274030d21356c7492e6de5969173c34d (patch)
treea1c25eacba4e6b98b0b1bf275a89ecc7ea0e20d2 /Assistant/Drop.hs
parent55fb90edfc8732b08bea9239a6f4a471ac7867c3 (diff)
add VerifiedCopy data type
There should be no behavior changes in this commit, it just adds a more expressive data type and adjusts code that had been passing around a [UUID] or sometimes a Maybe Remote to instead use [VerifiedCopy]. Although, since some functions were taking two different [UUID] lists, there's some potential for me to have gotten it horribly wrong.
Diffstat (limited to 'Assistant/Drop.hs')
-rw-r--r--Assistant/Drop.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Assistant/Drop.hs b/Assistant/Drop.hs
index 57eef8f3a..5653b7795 100644
--- a/Assistant/Drop.hs
+++ b/Assistant/Drop.hs
@@ -15,11 +15,12 @@ import Assistant.DaemonStatus
import Annex.Drop (handleDropsFrom, Reason)
import Logs.Location
import CmdLine.Action
+import Types.NumCopies
{- Drop from local and/or remote when allowed by the preferred content and
- numcopies settings. -}
-handleDrops :: Reason -> Bool -> Key -> AssociatedFile -> Maybe Remote -> Assistant ()
-handleDrops reason fromhere key f knownpresentremote = do
+handleDrops :: Reason -> Bool -> Key -> AssociatedFile -> [VerifiedCopy] -> Assistant ()
+handleDrops reason fromhere key f preverified = do
syncrs <- syncDataRemotes <$> getDaemonStatus
locs <- liftAnnex $ loggedLocations key
- liftAnnex $ handleDropsFrom locs syncrs reason fromhere key f knownpresentremote callCommandAction
+ liftAnnex $ handleDropsFrom locs syncrs reason fromhere key f preverified callCommandAction