aboutsummaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-26 16:44:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-26 16:44:14 -0400
commitb7903eb2d149ceb164d7422fb56573735d83ebde (patch)
tree83203e2fbc2ce7a6f5e24cfb23bfcc1b821d96cf /Backend
parent7f6af79232eee685daf58e72737c5284f80cf482 (diff)
move partitioning out of keyPossibilities
And a bug fix in passing.
Diffstat (limited to 'Backend')
-rw-r--r--Backend/File.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Backend/File.hs b/Backend/File.hs
index ac6e4a910..358bc4b7c 100644
--- a/Backend/File.hs
+++ b/Backend/File.hs
@@ -50,8 +50,7 @@ dummyStore _ _ = return True
- and copy it over to this one. -}
copyKeyFile :: Key -> FilePath -> Annex Bool
copyKeyFile key file = do
- (trusted, untrusted, _) <- Remotes.keyPossibilities key
- let remotes = trusted ++ untrusted
+ (remotes, _) <- Remotes.keyPossibilities key
if null remotes
then do
showNote "not available"
@@ -94,9 +93,10 @@ checkRemoveKey key numcopiesM = do
if force || numcopiesM == Just 0
then return True
else do
- (_, untrusted, have) <- Remotes.keyPossibilities key
+ (remotes, trusteduuids) <- Remotes.keyPossibilities key
+ untrusted <- reposWithoutUUID remotes trusteduuids
numcopies <- getNumCopies numcopiesM
- findcopies numcopies have untrusted []
+ findcopies numcopies trusteduuids untrusted []
where
findcopies need have [] bad
| length have >= need = return True