Skip to content

Commit 691209c

Browse files
committed
Use uninterruptibleMask_ in atomicFileWrite to prevent interruptions during file operations
1 parent 4c7e56a commit 691209c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ addRelativeImport fp modu dflags = dflags
787787

788788
-- | Also resets the interface store
789789
atomicFileWrite :: ShakeExtras -> FilePath -> (FilePath -> IO a) -> IO a
790-
atomicFileWrite se targetPath write = do
790+
atomicFileWrite se targetPath write = uninterruptibleMask_ $ do
791791
let dir = takeDirectory targetPath
792792
createDirectoryIfMissing True dir
793793
(tempFilePath, cleanUp) <- newTempFileWithin dir

0 commit comments

Comments
 (0)