diff options
Diffstat (limited to 'Gpg.hs')
-rw-r--r-- | Gpg.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |