summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2014-04-29 20:06:41 -0400
committerjoe <joe@jerkface.net>2014-04-29 20:06:41 -0400
commit616b0bf9d80258b9b7f10d7777a6043a4b5be3be (patch)
tree1b5592444c068f3ce7cfe06530c3f9f1a8a1cfa4
parent86f0933e30eb4bebec2ab4f32bceb52c95fb89ea (diff)
readPacketsFromFile takes InputFile instead of FilePath
-rw-r--r--KeyRing.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/KeyRing.hs b/KeyRing.hs
index b9f198e..8c57d96 100644
--- a/KeyRing.hs
+++ b/KeyRing.hs
@@ -1007,7 +1007,7 @@ buildKeyDB doDecrypt ctx grip0 keyring = do
1007 n <- resolveInputFile ctx f 1007 n <- resolveInputFile ctx f
1008 return (n, access stream) 1008 return (n, access stream)
1009 1009
1010 readp (n,acc) = fmap readp0 $ readPacketsFromFile n 1010 readp (n,acc) = fmap readp0 $ readPacketsFromFile ctx (ArgFile n)
1011 where 1011 where
1012 readp0 ps = ((n,acc'),ps) 1012 readp0 ps = ((n,acc'),ps)
1013 where acc' = case acc of 1013 where acc' = case acc of
@@ -1992,10 +1992,10 @@ readPacketsFromWallet wk fname = do
1992 (wk,MarkerPacket,(MarkerPacket,Map.empty)) 1992 (wk,MarkerPacket,(MarkerPacket,Map.empty))
1993 :map prep ks 1993 :map prep ks
1994 1994
1995readPacketsFromFile :: FilePath -> IO Message 1995readPacketsFromFile :: InputFileContext -> InputFile -> IO Message
1996readPacketsFromFile fname = do 1996readPacketsFromFile ctx fname = do
1997 -- warn $ fname ++ ": reading..." 1997 -- warn $ fname ++ ": reading..."
1998 input <- L.readFile fname 1998 input <- readInputFileL ctx fname
1999#if MIN_VERSION_binary(0,7,0) 1999#if MIN_VERSION_binary(0,7,0)
2000 return $ 2000 return $
2001 case decodeOrFail input of 2001 case decodeOrFail input of