diff options
author | Joey Hess <joey@kitenet.net> | 2014-11-03 21:02:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-11-03 21:12:15 -0400 |
commit | a86e452560999403a792db8dc4841dbeb1e7194a (patch) | |
tree | db58088ad389d450deb6fa670628e08f9621b813 /Remote | |
parent | 186421168c6602dde521b109d83812a4a58272c5 (diff) |
casts; now fully working.. but still leaking
Still seems to buffer the whole partsize in memory, but I'm pretty sure my
code is not what's doing it. See https://github.com/aristidb/aws/issues/142
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/S3.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 9184e0698..b10585515 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -183,7 +183,7 @@ store r h = fileStorer $ \k f p -> do -- The actual part size will be a even multiple of the -- 32k chunk size that hGetUntilMetered uses. - let partsz' = (partsz `div` defaultChunkSize) * defaultChunkSize + let partsz' = (partsz `div` toInteger defaultChunkSize) * toInteger defaultChunkSize -- Send parts of the file, taking care to stream each part -- w/o buffering in memory, since the parts can be large. @@ -198,7 +198,7 @@ store r h = fileStorer $ \k f p -> do then fsz - pos else partsz' b <- liftIO $ hGetUntilMetered fh (< partsz') meter - let body = RequestBodyStream sz (mkPopper b) + let body = RequestBodyStream (fromIntegral sz) (mkPopper b) S3.UploadPartResponse _ etag <- sendS3Handle h $ S3.uploadPart (bucket info) object partnum uploadid body sendparts (offsetMeterUpdate meter (toBytesProcessed sz)) (etag:etags) (partnum + 1) |