diff options
author | 2012-10-18 16:05:43 -0400 | |
---|---|---|
committer | 2012-10-18 16:05:43 -0400 | |
commit | a32043b86f1ad52ce33ffba92e6d3a57cff81bfb (patch) | |
tree | 982d3e55ce7bf15c106e748c1765b2f4bd41c3ba /Assistant/Drop.hs | |
parent | d956edbea525138445d4f2d928041e813896d9cd (diff) |
check and drop after uploads
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 |