tweak
This commit is contained in:
parent
aa4f91b2d6
commit
ee5d81429d
1 changed files with 2 additions and 2 deletions
|
@ -95,13 +95,13 @@ checkRemoveKey key numcopiesM = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
locations <- liftIO $ keyLocations g key
|
locations <- liftIO $ keyLocations g key
|
||||||
trusted <- getTrusted
|
trusted <- getTrusted
|
||||||
let trustedlocations = intersect locations trusted
|
let trustedcopies = length $ intersect locations trusted
|
||||||
remotes <- Remotes.keyPossibilities key
|
remotes <- Remotes.keyPossibilities key
|
||||||
untrustedremotes <- reposWithoutUUID remotes trusted
|
untrustedremotes <- reposWithoutUUID remotes trusted
|
||||||
numcopies <- getNumCopies numcopiesM
|
numcopies <- getNumCopies numcopiesM
|
||||||
if numcopies > length untrustedremotes
|
if numcopies > length untrustedremotes
|
||||||
then notEnoughCopies numcopies (length untrustedremotes) []
|
then notEnoughCopies numcopies (length untrustedremotes) []
|
||||||
else findcopies numcopies (length trustedlocations) untrustedremotes []
|
else findcopies numcopies trustedcopies untrustedremotes []
|
||||||
where
|
where
|
||||||
findcopies need have [] bad
|
findcopies need have [] bad
|
||||||
| have >= need = return True
|
| have >= need = return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue