From d44bd607d4fd18eadabe3c7693ebcf1c74aae63e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Jan 2014 17:08:49 -0400 Subject: numcopies cleanup, part 2 This includes several bug fixes. --- Annex/Drop.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Annex/Drop.hs') diff --git a/Annex/Drop.hs b/Annex/Drop.hs index afd6303b0..8cab7b065 100644 --- a/Annex/Drop.hs +++ b/Annex/Drop.hs @@ -60,8 +60,7 @@ handleDropsFrom locs rs reason fromhere key (Just afile) knownpresentremote runn where getcopies fs = do (untrusted, have) <- trustPartition UnTrusted locs - numcopies <- maximum - <$> mapM (getNumCopies <=< getFileNumCopies) fs + numcopies <- maximum <$> mapM getFileNumCopies fs return (NumCopies (length have), numcopies, S.fromList untrusted) {- Check that we have enough copies still to drop the content. @@ -88,7 +87,7 @@ handleDropsFrom locs rs reason fromhere key (Just afile) knownpresentremote runn checkdrop fs n@(have, numcopies, _untrusted) u a = ifM (allM (wantDrop True u . Just) fs) - ( ifM (safely $ runner $ a (Just numcopies)) + ( ifM (safely $ runner $ a numcopies) ( do liftIO $ debugM "drop" $ unwords [ "dropped" -- cgit v1.2.3