From 418365db0f28059421cb7c3c45534b1efbefbc04 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 9 Apr 2016 15:10:41 +0200 Subject: [PATCH] LIB: fix readFileContents We incorrectly added +1 to the filesize. --- src/HSFM/FileSystem/FileType.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HSFM/FileSystem/FileType.hs b/src/HSFM/FileSystem/FileType.hs index 39d3e7f..c5327a0 100644 --- a/src/HSFM/FileSystem/FileType.hs +++ b/src/HSFM/FileSystem/FileType.hs @@ -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