diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-03-03 16:16:36 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-03-03 16:16:36 -0400 |
commit | f569d149c4aabc6dc1ff0741de638a6adbd0328a (patch) | |
tree | 8b28575c2967a26c021c1ebeaf6393d5cd3a2018 | |
parent | fc39ddb96af70c14c5de739408b03a14ef2053bf (diff) | |
download | keysafe-f569d149c4aabc6dc1ff0741de638a6adbd0328a.tar.gz |
when we did not get enough shares, show how many we got
-rw-r--r-- | Share.hs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |