don't use writeFileProtected on windows
This was preventing the webapp from working.
This commit is contained in:
parent
be71b5e1d5
commit
c698d34b03
1 changed files with 4 additions and 0 deletions
|
@ -133,6 +133,7 @@ setSticky f = modifyFileMode f $ addModes [stickyMode]
|
||||||
- as writeFile.
|
- as writeFile.
|
||||||
-}
|
-}
|
||||||
writeFileProtected :: FilePath -> String -> IO ()
|
writeFileProtected :: FilePath -> String -> IO ()
|
||||||
|
#ifndef mingw32_HOST_OS
|
||||||
writeFileProtected file content = do
|
writeFileProtected file content = do
|
||||||
h <- openFile file WriteMode
|
h <- openFile file WriteMode
|
||||||
void $ tryIO $
|
void $ tryIO $
|
||||||
|
@ -140,3 +141,6 @@ writeFileProtected file content = do
|
||||||
removeModes [groupReadMode, otherReadMode]
|
removeModes [groupReadMode, otherReadMode]
|
||||||
hPutStr h content
|
hPutStr h content
|
||||||
hClose h
|
hClose h
|
||||||
|
#else
|
||||||
|
writeFileProtected = writeFile
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue