diff options
author | Tamar Christina <tamar@zhox.com> | 2019-11-24 15:22:16 +0000 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-02-14 10:17:00 -0500 |
commit | ecabfa28518947d752403bc1b59ee716652687da (patch) | |
tree | 1c3cacc11014d70d474f18f7f2f14184d238cf5b /compiler | |
parent | 584eee71f803ebf59f12758755151110a6e8636f (diff) | |
download | haskell-ecabfa28518947d752403bc1b59ee716652687da.tar.gz |
Revert "compiler: Disable atomic renaming on Windows"
The original reason this was disabled should be fixed by the previous
commit.
This reverts commit 1c1b63d63efe8b0f789aa7d5b87cfac3edd213eb.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/utils/Util.hs | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/compiler/utils/Util.hs b/compiler/utils/Util.hs index 41997178b4..6eb1390c06 100644 --- a/compiler/utils/Util.hs +++ b/compiler/utils/Util.hs @@ -1291,8 +1291,7 @@ modificationTimeIfExists f = do -- also results in a skip. withAtomicRename :: (MonadIO m) => FilePath -> (FilePath -> m a) -> m a -withAtomicRename targetFile f - | enableAtomicRename = do +withAtomicRename targetFile f = do -- The temp file must be on the same file system (mount) as the target file -- to result in an atomic move on most platforms. -- The standard way to ensure that is to place it into the same directory. @@ -1303,17 +1302,6 @@ withAtomicRename targetFile f liftIO $ renameFile temp targetFile return res - | otherwise = f targetFile - where - -- As described in #16450, enabling this causes spurious build failures due - -- to apparently missing files. - enableAtomicRename :: Bool -#if defined(mingw32_BUILD_OS) - enableAtomicRename = False -#else - enableAtomicRename = True -#endif - -- -------------------------------------------------------------- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string |