bugfix: Use openBinaryFile in Data.Binary.decodeFile. It makes difference only on Windows
This commit is contained in:
1 parent
cf4efe0acc
commit
f81a309eb1
1 file changed
+1
-1
+1
-1
@@ -271,7 +271,7 @@ encodeFile f v = L.writeFile f (encode v)
|
||||
-- or otherwise finalise the resource.
|
||||
--
|
||||
decodeFile :: Binary a => FilePath -> IO a
|
||||
decodeFile f = bracket (openFile f ReadMode) hClose $ \h -> do
|
||||
decodeFile f = bracket (openBinaryFile f ReadMode) hClose $ \h -> do
|
||||
s <- L.hGetContents h
|
||||
evaluate $ runGet (do v <- get
|
||||
m <- isEmpty
|
||||
|
||||
Reference in new issue
Block a user