fix logic error

This commit is contained in:
Joey Hess 2024-10-15 14:28:47 -04:00
parent edaed18e4c
commit 54fcc2ec51
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -307,7 +307,7 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv oclosedv mexportdb = go
) )
getcontents n h = unsafeInterleaveIO $ do getcontents n h = unsafeInterleaveIO $ do
isdone <- isEmptyMVar donev <||> isEmptyMVar cancelv isdone <- (not <$> isEmptyMVar donev) <||> (not <$> isEmptyMVar cancelv)
c <- BS.hGet h defaultChunkSize c <- BS.hGet h defaultChunkSize
let n' = n - fromIntegral (BS.length c) let n' = n - fromIntegral (BS.length c)
let c' = L.fromChunks [BS.take (fromIntegral n) c] let c' = L.fromChunks [BS.take (fromIntegral n) c]