summaryrefslogtreecommitdiff
path: root/Remote/Helper/Chunked.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-07-26 22:47:52 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-07-26 22:47:52 -0400
commit0859c35391c71bcacd99c1c383885a40b849e1a0 (patch)
tree168247644ed4d39242a4630019e9a4e77aff8826 /Remote/Helper/Chunked.hs
parentc1cfb10215c56bf5125965fd7ea6b37bf99b343d (diff)
fix another fallback bug
Diffstat (limited to 'Remote/Helper/Chunked.hs')
-rw-r--r--Remote/Helper/Chunked.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs
index 4cb20b875..5a52a1f4b 100644
--- a/Remote/Helper/Chunked.hs
+++ b/Remote/Helper/Chunked.hs
@@ -146,7 +146,9 @@ toChunkList k (chunksize, chunkcount) = takeChunkKeyStream chunkcount $
chunkKeyStream k chunksize
{- Removes all chunks of a key from a remote, by calling a remover
- - action on each. The remover action should succeed even if asked to
+ - action on each.
+ -
+ - The remover action should succeed even if asked to
- remove a key that is not present on the remote.
-
- This action may be called on a chunked key. It will simply remove it.
@@ -231,7 +233,9 @@ hasKeyChunks checker u chunkconfig encryptor basek = do
case v of
Left e -> checklists e ls
Right True -> return (Right True)
- Right False -> checklists impossible ls
+ Right False
+ | null ls -> return (Right False)
+ | otherwise -> checklists impossible ls
| otherwise = checklists impossible ls
checkchunks :: [Key] -> Annex (Either String Bool)