summaryrefslogtreecommitdiffhomepage
path: root/Gpg.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Gpg.hs')
-rw-r--r--Gpg.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Gpg.hs b/Gpg.hs
index 9a743f0..4522cfb 100644
--- a/Gpg.hs
+++ b/Gpg.hs
@@ -42,8 +42,10 @@ listSecretKeys = map mk . parse . lines <$> readProcess "gpg"
parse = extract [] Nothing . map (splitOn ":")
extract c (Just keyid) (("uid":_:_:_:_:_:_:_:_:userid:_):rest) =
extract ((userid, keyid):c) Nothing rest
- extract c (Just keyid) rest =
+ extract c (Just keyid) rest@(("sec":_):_) =
extract (("", keyid):c) Nothing rest
+ extract c (Just keyid) (_:rest) =
+ extract c (Just keyid) rest
extract c _ [] = c
extract c _ (("sec":_:_:_:keyid:_):rest) =
extract c (Just keyid) rest