fix fallback to other chunk size when first does not have it
This commit is contained in:
parent
275e284dda
commit
67975bf50d
1 changed files with 7 additions and 4 deletions
|
@ -221,14 +221,17 @@ hasKeyChunks
|
||||||
-> EncKey
|
-> EncKey
|
||||||
-> Key
|
-> Key
|
||||||
-> Annex (Either String Bool)
|
-> Annex (Either String Bool)
|
||||||
hasKeyChunks checker u chunkconfig encryptor basek =
|
hasKeyChunks checker u chunkconfig encryptor basek = do
|
||||||
checklists impossible =<< chunkKeys u chunkconfig basek
|
checklists impossible =<< chunkKeys u chunkconfig basek
|
||||||
where
|
where
|
||||||
checklists lastfailmsg [] = return $ Left lastfailmsg
|
checklists lastfailmsg [] = return $ Left lastfailmsg
|
||||||
checklists _ (l:ls)
|
checklists _ (l:ls)
|
||||||
| not (null l) =
|
| not (null l) = do
|
||||||
either (`checklists` ls) (return . Right)
|
v <- checkchunks l
|
||||||
=<< checkchunks l
|
case v of
|
||||||
|
Left e -> checklists e ls
|
||||||
|
Right True -> return (Right True)
|
||||||
|
Right False -> checklists impossible ls
|
||||||
| otherwise = checklists impossible ls
|
| otherwise = checklists impossible ls
|
||||||
|
|
||||||
checkchunks :: [Key] -> Annex (Either String Bool)
|
checkchunks :: [Key] -> Annex (Either String Bool)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue