diff options
Diffstat (limited to 'Assistant/Drop.hs')
-rw-r--r-- | Assistant/Drop.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Assistant/Drop.hs b/Assistant/Drop.hs index dea5934ee..cf20ef5b1 100644 --- a/Assistant/Drop.hs +++ b/Assistant/Drop.hs @@ -18,19 +18,18 @@ import Command import Annex.Wanted import Config -{- Drop from syncable remotes when allowed by the preferred content and +{- Drop from local and/or remote when allowed by the preferred content and - numcopies settings. -} -handleRemoteDrops :: DaemonStatusHandle -> Key -> AssociatedFile -> Annex () -handleRemoteDrops dstatus key (Just f) = do +handleDrops :: DaemonStatusHandle -> Bool -> Key -> AssociatedFile -> Annex () +handleDrops _ _ _ Nothing = noop +handleDrops dstatus fromhere key f = do syncrs <- liftIO $ syncRemotes <$> getDaemonStatus dstatus locs <- loggedLocations key - handleDrops locs syncrs False f key -handleRemoteDrops _ _ _ = noop + handleDrops' locs syncrs fromhere key f -{- Drop from local and/or remote when allowed by the preferred content and - - numcopies settings. -} -handleDrops :: [UUID] -> [Remote] -> Bool -> FilePath -> Key -> Annex () -handleDrops locs rs fromhere f key +handleDrops' :: [UUID] -> [Remote] -> Bool -> Key -> AssociatedFile -> Annex () +handleDrops' _ _ _ _ Nothing = noop +handleDrops' locs rs fromhere key (Just f) | fromhere = do n <- getcopies if checkcopies n |