fix: web: don't hang when saving a large file [#2319]

This commit is contained in:
Simon Michael 2025-05-16 09:44:26 -10:00
parent 151b36a6f2
commit 8f6a7c8a66

View File

@ -452,8 +452,8 @@ inputToHandle t = do
(r, w) <- createPipe (r, w) <- createPipe
hSetEncoding r utf8_bom hSetEncoding r utf8_bom
hSetEncoding w utf8_bom hSetEncoding w utf8_bom
T.hPutStr w t -- use a separate thread so that we don't deadlock if we can't write all of the text at once
hClose w forkIO $ T.hPutStr w t >> hClose w
return r return r
-- | Like embedFile, but takes a path relative to the package directory. -- | Like embedFile, but takes a path relative to the package directory.