diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-06 21:11:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-06 21:11:17 -0400 |
commit | 5a795c7f7b12429a7003c27e740579248c94a628 (patch) | |
tree | f612a66c1b94f21c6451af3b6128cd582a8d4e6f /Utility/FileMode.hs | |
parent | 26ef5f228bb238dddfd379114013db039a465164 (diff) |
don't use writeFileProtected on windows
This was preventing the webapp from working.
Diffstat (limited to 'Utility/FileMode.hs')
-rw-r--r-- | Utility/FileMode.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Utility/FileMode.hs b/Utility/FileMode.hs index 46c6a31f5..cbc960a4a 100644 --- a/Utility/FileMode.hs +++ b/Utility/FileMode.hs @@ -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 |