summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2010-12-28 17:19:01 -0400
committerGravatar Joey Hess <joey@kitenet.net>2010-12-28 17:19:01 -0400
commitee5d81429dcc6c8c2922c4c6696abc17e0440ff6 (patch)
tree44f827fea889ffdf69b3dc822dae9c6b8b151144
parentaa4f91b2d67b9f7827b02acebfbf4e67ba33bb80 (diff)
tweak
-rw-r--r--Backend/File.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index 0b1cdd8e5..092cf7e73 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -95,13 +95,13 @@ checkRemoveKey key numcopiesM = do
g <- Annex.gitRepo
locations <- liftIO $ keyLocations g key
trusted <- getTrusted
- let trustedlocations = intersect locations trusted
+ let trustedcopies = length $ intersect locations trusted
remotes <- Remotes.keyPossibilities key
untrustedremotes <- reposWithoutUUID remotes trusted
numcopies <- getNumCopies numcopiesM
if numcopies > length untrustedremotes
then notEnoughCopies numcopies (length untrustedremotes) []
- else findcopies numcopies (length trustedlocations) untrustedremotes []
+ else findcopies numcopies trustedcopies untrustedremotes []
where
findcopies need have [] bad
| have >= need = return True