don't use writeFileProtected on windows

This was preventing the webapp from working.
This commit is contained in:
Joey Hess 2013-12-06 21:11:17 -04:00
parent be71b5e1d5
commit c698d34b03

View file

@ -133,6 +133,7 @@ setSticky f = modifyFileMode f $ addModes [stickyMode]
- as writeFile.
-}
writeFileProtected :: FilePath -> String -> IO ()
#ifndef mingw32_HOST_OS
writeFileProtected file content = do
h <- openFile file WriteMode
void $ tryIO $
@ -140,3 +141,6 @@ writeFileProtected file content = do
removeModes [groupReadMode, otherReadMode]
hPutStr h content
hClose h
#else
writeFileProtected = writeFile
#endif