diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-21 17:08:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-21 17:25:39 -0400 |
commit | d44bd607d4fd18eadabe3c7693ebcf1c74aae63e (patch) | |
tree | 83e8867f45199ece960fc67e4d31f1d9b4a5d56a /Annex/Drop.hs | |
parent | d5f7fb27aad3e2e9c4bebb9ccd5577af8deb25c7 (diff) |
numcopies cleanup, part 2
This includes several bug fixes.
Diffstat (limited to 'Annex/Drop.hs')
-rw-r--r-- | Annex/Drop.hs | 5 |
1 files changed, 2 insertions, 3 deletions
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" |