fsck: Fix warning about not enough copies of a file, when locations are known, but are not available in currently configured remotes.
This commit is contained in:
parent
abf084f628
commit
949e4abc56
2 changed files with 5 additions and 3 deletions
|
@ -163,9 +163,9 @@ checkKey a key numcopies = do
|
|||
checkKeyNumCopies :: Key -> Maybe Int -> Annex Bool
|
||||
checkKeyNumCopies key numcopies = do
|
||||
needed <- getNumCopies numcopies
|
||||
remotes <- Remotes.keyPossibilities key
|
||||
inannex <- inAnnex key
|
||||
let present = length remotes + if inannex then 1 else 0
|
||||
g <- Annex.gitRepo
|
||||
locations <- liftIO $ keyLocations g key
|
||||
let present = length locations
|
||||
if present < needed
|
||||
then do
|
||||
warning $ note present needed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue