LIB: fix readFileContents
We incorrectly added +1 to the filesize.
This commit is contained in:
parent
5bce5dd6ff
commit
418365db0f
@ -550,7 +550,7 @@ readFileContents af@(_ :/ RegFile{}) =
|
|||||||
PIO.closeFd
|
PIO.closeFd
|
||||||
$ \fd -> do
|
$ \fd -> do
|
||||||
filesz <- fmap PF.fileSize $ PF.getFdStatus fd
|
filesz <- fmap PF.fileSize $ PF.getFdStatus fd
|
||||||
PIOB.fdRead fd ((fromIntegral filesz `max` 0) + 1)
|
PIOB.fdRead fd (fromIntegral filesz `max` 0)
|
||||||
where
|
where
|
||||||
f = fullPathS af
|
f = fullPathS af
|
||||||
readFileContents _ = return B.empty
|
readFileContents _ = return B.empty
|
||||||
|
Loading…
Reference in New Issue
Block a user