LIB: fix readFileContents

We incorrectly added +1 to the filesize.
This commit is contained in:
Julian Ospald 2016-04-09 15:10:41 +02:00
parent 5bce5dd6ff
commit 418365db0f
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

View File

@ -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