diff options
author | Joey Hess <joey@kitenet.net> | 2014-11-03 20:15:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-11-03 20:15:33 -0400 |
commit | c973711ffb463d69ac6cdce599832d482986d1da (patch) | |
tree | e5f55280bc7b244cc828ec2061f7846098602074 /Remote | |
parent | 0dd5559b4946ed8d4714bd9ce2e18b9944568039 (diff) |
logic error
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 73518c65c..3e87407c5 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -20,7 +20,7 @@ import qualified Data.ByteString as S import qualified Data.Map as M import Data.Char import Network.Socket (HostName) -import Network.HTTP.Conduit (Manager, newManager, closeManager, withManager) +import Network.HTTP.Conduit (Manager, newManager, closeManager) import Network.HTTP.Client (defaultManagerSettings, managerResponseTimeout, responseStatus, responseBody, RequestBody(..)) import Network.HTTP.Types import Control.Monad.Trans.Resource @@ -184,7 +184,7 @@ store r h = fileStorer $ \k f p -> do -- Send parts of the file, taking care to stream each part -- w/o buffering in memory, since the parts can be large. etags <- bracketIO (openBinaryFile f ReadMode) hClose $ \fh -> do - let sendparts meter etags partnum = ifM (liftIO $ hIsOpen fh) + let sendparts meter etags partnum = ifM (liftIO $ hIsClosed fh) ( return (reverse etags) , do b <- liftIO $ hGetUntilMetered fh (< partsz) meter |