From 86f0933e30eb4bebec2ab4f32bceb52c95fb89ea Mon Sep 17 00:00:00 2001 From: joe Date: Tue, 29 Apr 2014 19:59:36 -0400 Subject: readPacketsFromWallet takes InputFile instead of FilePath --- KeyRing.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/KeyRing.hs b/KeyRing.hs index 8d527e6..b9f198e 100644 --- a/KeyRing.hs +++ b/KeyRing.hs @@ -1018,7 +1018,7 @@ buildKeyDB doDecrypt ctx grip0 keyring = do _ -> AutoAccess acc -> acc - readw wk n = fmap (n,) (readPacketsFromWallet wk n) + readw wk n = fmap (n,) (readPacketsFromWallet wk (ArgFile n)) importWalletKey wk db' (top,fname,sub,tag) = do try db' $ \(db',report0) -> do @@ -1972,12 +1972,12 @@ rsaKeyFromPacket _ = Nothing readPacketsFromWallet :: Maybe Packet - -> FilePath + -> InputFile -> IO [(Packet,Packet,(Packet,Map.Map FilePath Packet))] readPacketsFromWallet wk fname = do - timestamp <- handleIO_ (error $ fname++": modificaiton time?") $ - modificationTime <$> getFileStatus fname - input <- L.readFile fname + let ctx = InputFileContext "" "" + timestamp <- getInputFileTime ctx fname + input <- readInputFileL ctx fname let (ks,_) = slurpWIPKeys timestamp input unless (null ks) $ do -- decrypt wk -- cgit v1.2.3