on master help sign in
Fix file handle problem.

When there was a parse error, Windows would keep the file handle open because the file was only partially read.

commitfb07818e87422fd250559965f01b71a1e060de60 authorevancz <info@elm-lang.org> dateThu 30 May 2013, 08:02 (13 years ago) parent6b28fea
1 file changed+1−1
server/Server.hs+1−1
server/Server.hs+1−1
@@ -32,7 +32,7 @@ pageTitle = dropExtension . takeBaseName
3232serveElm fp = do
3333 guard (takeExtension fp == ".elm")
3434 content <- liftIO (readFile (tail fp))
35− ok . toResponse $ Elm.toHtml runtime (pageTitle fp) content
35+ length content `seq` (ok . toResponse $ Elm.toHtml runtime (pageTitle fp) content)
3636
3737serveLib libLoc fp = do
3838 guard (fp == runtime)