on master help sign in
Open files in binary mode
commit51a9b6944c96166c3abbdfab191fb4165b502eb6 authorDavid Raymond Christiansen <david@davidchristiansen.dk> dateTue 19 Aug 2014, 14:31 (12 years ago) parent42dbdbe
1 file changed+3−1
src/Idris/Core/Execute.hs+3−1
src/Idris/Core/Execute.hs+3−1
@@ -265,7 +265,9 @@ execApp env ctxt (EP _ fp _) (_:fn:fileStr:modeStr:rest)
265265 "r+" -> Right ReadWriteMode
266266 _ -> Left ("Invalid mode for " ++ f ++ ": " ++ mode)
267267 case fmap (openFile f) m of
268− Right h -> do h' <- h; return $ Right (ioWrap (EHandle h'), tail rest)
268+ Right h -> do h' <- h
269+ hSetBinaryMode h' True
270+ return $ Right (ioWrap (EHandle h'), tail rest)
269271 Left err -> return $ Left err)
270272 (\e -> let _ = ( e::SomeException)
271273 in return $ Right (ioWrap (EPtr nullPtr), tail rest))