summaryrefslogtreecommitdiff
path: root/Remote/Directory.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-18 18:27:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-18 18:27:53 -0400
commitac71b499ac6d53408cfce19a1ddd00bfa4b2645f (patch)
tree8edf701de6ee4a7fae691743e87ac1f5f6e78b25 /Remote/Directory.hs
parent677aab525a7023642f4b2e9d96db3c3481e8f0b1 (diff)
simplify
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r--Remote/Directory.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs
index 0527270a1..a61ef83c0 100644
--- a/Remote/Directory.hs
+++ b/Remote/Directory.hs
@@ -180,13 +180,8 @@ retrieve :: FilePath -> ChunkSize -> Key -> AssociatedFile -> FilePath -> Annex
retrieve d chunksize k _ f = metered Nothing k $ \meterupdate ->
liftIO $ withStoredFiles chunksize d k $ \files ->
catchBoolIO $ do
- meteredWriteFileChunks meterupdate f files feeder
+ meteredWriteFileChunks meterupdate f files $ L.readFile
return True
- where
- feeder [] = return ([], [])
- feeder (x:xs) = do
- chunks <- L.toChunks <$> L.readFile x
- return (xs, chunks)
retrieveEncrypted :: FilePath -> ChunkSize -> (Cipher, Key) -> Key -> FilePath -> Annex Bool
retrieveEncrypted d chunksize (cipher, enck) k f = metered Nothing k $ \meterupdate ->