summaryrefslogtreecommitdiff
path: root/lib/KeyRing
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-07-02 05:30:36 -0400
committerJoe Crayne <joe@jerkface.net>2019-07-02 05:30:36 -0400
commit4e87e15398728286efeacdb54d3feba6070ed1b1 (patch)
tree71988340ccee7a4bf2b0600a87bc1249f4ca4f6f /lib/KeyRing
parent75aeff50b20f0bf08cfcda371c6323b73fe73a23 (diff)
Read packet file with larger chunk size.
Diffstat (limited to 'lib/KeyRing')
-rw-r--r--lib/KeyRing/BuildKeyDB.hs6
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
91import Data.IORef 91import Data.IORef
92import Data.Traversable (sequenceA) 92import Data.Traversable (sequenceA)
93import qualified Data.Traversable as Traversable 93import qualified Data.Traversable as Traversable
94import System.IO (stderr) 94import System.IO (stderr,openFile,IOMode(ReadMode))
95 95
96import System.Posix.IO (fdToHandle) 96import 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
115import Transforms 115import Transforms
116import PacketTranscoder 116import PacketTranscoder
117import GnuPGAgent 117import GnuPGAgent
118import ByteStringUtil
118 119
119-- | buildKeyDB 120-- | buildKeyDB
120-- 121--
@@ -611,7 +612,8 @@ readInputFileL ctx (Pipe fd _) = fdToHandle fd >>= L.hGetContents
611readInputFileL ctx (FileDesc fd) = fdToHandle fd >>= L.hGetContents 612readInputFileL ctx (FileDesc fd) = fdToHandle fd >>= L.hGetContents
612readInputFileL ctx inp = do 613readInputFileL 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
616getInputFileTime :: InputFileContext -> InputFile -> IO CTime 618getInputFileTime :: InputFileContext -> InputFile -> IO CTime
617getInputFileTime ctx (Pipe fdr fdw) = do 619getInputFileTime ctx (Pipe fdr fdw) = do