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
1 changed files with 1 additions and 1 deletions

View File

@ -550,7 +550,7 @@ readFileContents af@(_ :/ RegFile{}) =
PIO.closeFd
$ \fd -> do
filesz <- fmap PF.fileSize $ PF.getFdStatus fd
PIOB.fdRead fd ((fromIntegral filesz `max` 0) + 1)
PIOB.fdRead fd (fromIntegral filesz `max` 0)
where
f = fullPathS af
readFileContents _ = return B.empty