summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-03-03 16:16:36 -0400
committerJoey Hess <joeyh@joeyh.name>2017-03-03 16:16:36 -0400
commitf569d149c4aabc6dc1ff0741de638a6adbd0328a (patch)
tree8b28575c2967a26c021c1ebeaf6393d5cd3a2018
parentfc39ddb96af70c14c5de739408b03a14ef2053bf (diff)
downloadkeysafe-f569d149c4aabc6dc1ff0741de638a6adbd0328a.tar.gz
when we did not get enough shares, show how many we got
-rw-r--r--Share.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Share.hs b/Share.hs
index 2d848b9..6d39f99 100644
--- a/Share.hs
+++ b/Share.hs
@@ -94,7 +94,8 @@ genShares (EncryptedSecretKey cs _) tunables = do
combineShares :: Tunables -> [S.Set Share] -> Either String EncryptedSecretKey
combineShares tunables shares
| null shares || any null shares || any (\l -> length l < sharesneeded) shares =
- Left "Not enough shares are currently available to reconstruct your data."
+ Left $ "Not enough shares are currently available to reconstruct your data. " ++
+ concatMap (\l -> "(Got " ++ show (length l) ++ "/" ++ show sharesneeded ++ ") ") shares
| otherwise = Right $ mk $
map (BL.toStrict . SS.decode . map decodeshare . S.toList) shares
where