diff options
author | joe <joe@jerkface.net> | 2014-04-29 19:59:36 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2014-04-29 19:59:36 -0400 |
commit | 86f0933e30eb4bebec2ab4f32bceb52c95fb89ea (patch) | |
tree | 1a5508d9b97cb0148df660f2dbbff41e6f429896 | |
parent | 90c2ea4ba234d7d049d72c2078044bc2a24e3977 (diff) |
readPacketsFromWallet takes InputFile instead of FilePath
-rw-r--r-- | KeyRing.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1018,7 +1018,7 @@ buildKeyDB doDecrypt ctx grip0 keyring = do | |||
1018 | _ -> AutoAccess | 1018 | _ -> AutoAccess |
1019 | acc -> acc | 1019 | acc -> acc |
1020 | 1020 | ||
1021 | readw wk n = fmap (n,) (readPacketsFromWallet wk n) | 1021 | readw wk n = fmap (n,) (readPacketsFromWallet wk (ArgFile n)) |
1022 | 1022 | ||
1023 | importWalletKey wk db' (top,fname,sub,tag) = do | 1023 | importWalletKey wk db' (top,fname,sub,tag) = do |
1024 | try db' $ \(db',report0) -> do | 1024 | try db' $ \(db',report0) -> do |
@@ -1972,12 +1972,12 @@ rsaKeyFromPacket _ = Nothing | |||
1972 | 1972 | ||
1973 | readPacketsFromWallet :: | 1973 | readPacketsFromWallet :: |
1974 | Maybe Packet | 1974 | Maybe Packet |
1975 | -> FilePath | 1975 | -> InputFile |
1976 | -> IO [(Packet,Packet,(Packet,Map.Map FilePath Packet))] | 1976 | -> IO [(Packet,Packet,(Packet,Map.Map FilePath Packet))] |
1977 | readPacketsFromWallet wk fname = do | 1977 | readPacketsFromWallet wk fname = do |
1978 | timestamp <- handleIO_ (error $ fname++": modificaiton time?") $ | 1978 | let ctx = InputFileContext "" "" |
1979 | modificationTime <$> getFileStatus fname | 1979 | timestamp <- getInputFileTime ctx fname |
1980 | input <- L.readFile fname | 1980 | input <- readInputFileL ctx fname |
1981 | let (ks,_) = slurpWIPKeys timestamp input | 1981 | let (ks,_) = slurpWIPKeys timestamp input |
1982 | unless (null ks) $ do | 1982 | unless (null ks) $ do |
1983 | -- decrypt wk | 1983 | -- decrypt wk |