From 6a6cc6675271205e4759383456118f5dc33f617b Mon Sep 17 00:00:00 2001 From: joe Date: Wed, 30 Apr 2014 20:14:33 -0400 Subject: resolveForReport --- KeyRing.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/KeyRing.hs b/KeyRing.hs index e93d4a3..40835ce 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -266,6 +266,11 @@ resolveInputFile ctx = resolve resolve (ArgFile f) = return f resolve _ = [] +resolveForReport :: Maybe InputFileContext -> InputFile -> FilePath +resolveForReport mctx (FileDesc fd) = resolveForReport mctx (ArgFile str) + where str = "&" ++ show fd +resolveForReport mctx f = concat $ resolveInputFile ctx f + where ctx = fromMaybe (InputFileContext "&secret" "&public") mctx filesToLock :: KeyRingOperation -> InputFileContext -> [FilePath] @@ -1589,11 +1594,10 @@ writePEMKeys doDecrypt db exports = do then do rs <- mapM (\(f,p) -> writeKeyToFile False "PEM" (ArgFile f) p) (rights ds') - return $ KikiSuccess (map (first resolve) $ concat rs) + return $ KikiSuccess (map (first $ resolveForReport Nothing) $ concat rs) else do return (head $ lefts ds') where - resolve f = concat $ resolveInputFile (InputFileContext "" "") f decryptKeys (fname,subspec,[p],_) = do pun <- doDecrypt p try pun $ \pun -> do -- cgit v1.2.3