summaryrefslogtreecommitdiff
path: root/Remote/Helper/Chunked.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Helper/Chunked.hs')
-rw-r--r--Remote/Helper/Chunked.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs
index 18dfe8aee..baf47f067 100644
--- a/Remote/Helper/Chunked.hs
+++ b/Remote/Helper/Chunked.hs
@@ -221,14 +221,17 @@ hasKeyChunks
-> EncKey
-> Key
-> Annex (Either String Bool)
-hasKeyChunks checker u chunkconfig encryptor basek =
+hasKeyChunks checker u chunkconfig encryptor basek = do
checklists impossible =<< chunkKeys u chunkconfig basek
where
checklists lastfailmsg [] = return $ Left lastfailmsg
checklists _ (l:ls)
- | not (null l) =
- either (`checklists` ls) (return . Right)
- =<< checkchunks l
+ | not (null l) = do
+ v <- checkchunks l
+ case v of
+ Left e -> checklists e ls
+ Right True -> return (Right True)
+ Right False -> checklists impossible ls
| otherwise = checklists impossible ls
checkchunks :: [Key] -> Annex (Either String Bool)