diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-02 22:59:07 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-02 22:59:07 -0400 |
commit | c81a8bd68c53348b9e561dc588499452a5a654c7 (patch) | |
tree | d1c52c78723784f20c33763c282860878d19f979 /Assistant/Threads/TransferScanner.hs | |
parent | 0d14a987dc4887de5516497206356652e846c996 (diff) |
hlint
Diffstat (limited to 'Assistant/Threads/TransferScanner.hs')
-rw-r--r-- | Assistant/Threads/TransferScanner.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Assistant/Threads/TransferScanner.hs b/Assistant/Threads/TransferScanner.hs index 631310987..ba302d6bb 100644 --- a/Assistant/Threads/TransferScanner.hs +++ b/Assistant/Threads/TransferScanner.hs @@ -85,13 +85,13 @@ failedTransferScan r = do mapM_ retry failed where retry (t, info) - | transferDirection t == Download = do + | transferDirection t == Download = {- Check if the remote still has the key. - If not, relies on the expensiveScan to - get it queued from some other remote. -} whenM (liftAnnex $ remoteHas r $ transferKey t) $ requeue t info - | otherwise = do + | otherwise = {- The Transferrer checks when uploading - that the remote doesn't already have the - key, so it's not redundantly checked here. -} @@ -161,7 +161,7 @@ expensiveScan urlrenderer rs = unless onlyweb $ batch <~> do present key (Just f) Nothing liftAnnex $ do let slocs = S.fromList locs - let use a = return $ catMaybes $ map (a key slocs) syncrs + let use a = return $ mapMaybe (a key slocs) syncrs ts <- if present then filterM (wantSend True (Just f) . Remote.uuid . fst) =<< use (genTransfer Upload False) @@ -173,7 +173,7 @@ expensiveScan urlrenderer rs = unless onlyweb $ batch <~> do genTransfer :: Direction -> Bool -> Key -> S.Set UUID -> Remote -> Maybe (Remote, Transfer) genTransfer direction want key slocs r | direction == Upload && Remote.readonly r = Nothing - | (S.member (Remote.uuid r) slocs) == want = Just + | S.member (Remote.uuid r) slocs == want = Just (r, Transfer direction (Remote.uuid r) key) | otherwise = Nothing |