diff options
author | Joe Crayne <joe@jerkface.net> | 2019-07-02 05:30:36 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2019-07-02 05:30:36 -0400 |
commit | 4e87e15398728286efeacdb54d3feba6070ed1b1 (patch) | |
tree | 71988340ccee7a4bf2b0600a87bc1249f4ca4f6f /lib/KeyRing | |
parent | 75aeff50b20f0bf08cfcda371c6323b73fe73a23 (diff) |
Read packet file with larger chunk size.
Diffstat (limited to 'lib/KeyRing')
-rw-r--r-- | lib/KeyRing/BuildKeyDB.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/KeyRing/BuildKeyDB.hs b/lib/KeyRing/BuildKeyDB.hs index ad47ed0..ba5bafe 100644 --- a/lib/KeyRing/BuildKeyDB.hs +++ b/lib/KeyRing/BuildKeyDB.hs | |||
@@ -91,7 +91,7 @@ import Foreign.Storable | |||
91 | import Data.IORef | 91 | import Data.IORef |
92 | import Data.Traversable (sequenceA) | 92 | import Data.Traversable (sequenceA) |
93 | import qualified Data.Traversable as Traversable | 93 | import qualified Data.Traversable as Traversable |
94 | import System.IO (stderr) | 94 | import System.IO (stderr,openFile,IOMode(ReadMode)) |
95 | 95 | ||
96 | import System.Posix.IO (fdToHandle) | 96 | import System.Posix.IO (fdToHandle) |
97 | #if ! MIN_VERSION_base(4,6,0) | 97 | #if ! MIN_VERSION_base(4,6,0) |
@@ -115,6 +115,7 @@ import KeyRing.Types | |||
115 | import Transforms | 115 | import Transforms |
116 | import PacketTranscoder | 116 | import PacketTranscoder |
117 | import GnuPGAgent | 117 | import GnuPGAgent |
118 | import ByteStringUtil | ||
118 | 119 | ||
119 | -- | buildKeyDB | 120 | -- | buildKeyDB |
120 | -- | 121 | -- |
@@ -611,7 +612,8 @@ readInputFileL ctx (Pipe fd _) = fdToHandle fd >>= L.hGetContents | |||
611 | readInputFileL ctx (FileDesc fd) = fdToHandle fd >>= L.hGetContents | 612 | readInputFileL ctx (FileDesc fd) = fdToHandle fd >>= L.hGetContents |
612 | readInputFileL ctx inp = do | 613 | readInputFileL ctx inp = do |
613 | let fname = resolveInputFile ctx inp | 614 | let fname = resolveInputFile ctx inp |
614 | fmap L.concat $ mapM L.readFile fname | 615 | hs <- mapM (`openFile` ReadMode) fname |
616 | fmap L.concat $ mapM (hGetContentsN oneMeg) hs | ||
615 | 617 | ||
616 | getInputFileTime :: InputFileContext -> InputFile -> IO CTime | 618 | getInputFileTime :: InputFileContext -> InputFile -> IO CTime |
617 | getInputFileTime ctx (Pipe fdr fdw) = do | 619 | getInputFileTime ctx (Pipe fdr fdw) = do |