From 9751908b69f166ad26183b7d3cdd3b0fb7b3830a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 Apr 2015 14:11:29 -0400 Subject: move nubbing into function whose algo needs a nubbed list --- Annex/NumCopies.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Annex/NumCopies.hs') diff --git a/Annex/NumCopies.hs b/Annex/NumCopies.hs index 62cd93883..879513927 100644 --- a/Annex/NumCopies.hs +++ b/Annex/NumCopies.hs @@ -99,7 +99,8 @@ verifyEnoughCopies -> [UUID] -- repos that are trusted or already verified to have it -> [Remote] -- remotes to check to see if they have it -> Annex Bool -verifyEnoughCopies nolocmsg key need skip = helper [] [] +verifyEnoughCopies nolocmsg key need skip trusted tocheck = + helper [] [] (nub trusted) (nub tocheck) where helper bad missing have [] | NumCopies (length have) >= need = return True @@ -140,7 +141,7 @@ knownCopies key = do (remotes, trusteduuids) <- Remote.keyPossibilitiesTrusted key u <- getUUID trusteduuids' <- ifM (inAnnex key <&&> (<= SemiTrusted) <$> lookupTrust u) - ( pure (nub (u:trusteduuids)) + ( pure (u:trusteduuids) , pure trusteduuids ) return (remotes, trusteduuids') -- cgit v1.2.3