diff options
author | Joey Hess <joey@kitenet.net> | 2010-12-29 16:58:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-12-29 16:58:44 -0400 |
commit | e64ffc212e394d814ab73a32f750acbccb43dd1f (patch) | |
tree | ae60f1b4d535bca39fd95b2b7a05d175b700b737 /Backend | |
parent | ef85e699babd2aabdc64e048422456ac68244ef2 (diff) |
support trusted repositories that are not configured as remotes
Diffstat (limited to 'Backend')
-rw-r--r-- | Backend/File.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Backend/File.hs b/Backend/File.hs index 918ba4716..ee7315021 100644 --- a/Backend/File.hs +++ b/Backend/File.hs @@ -49,7 +49,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 + (trusted, untrusted, _) <- Remotes.keyPossibilities key let remotes = trusted ++ untrusted if null remotes then do @@ -92,10 +92,9 @@ checkRemoveKey key numcopiesM = do if force || numcopiesM == Just 0 then return True else do - (trusted, untrusted) <- Remotes.keyPossibilities key + (_, untrusted, have) <- Remotes.keyPossibilities key numcopies <- getNumCopies numcopiesM - trusteduuids <- mapM getUUID trusted - findcopies numcopies trusteduuids untrusted [] + findcopies numcopies have untrusted [] where findcopies need have [] bad | length have >= need = return True |