Skip to content

Commit

Permalink
#678, fix serious bug in writeFileChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
ndmitchell committed May 19, 2019
1 parent 7f76a27 commit c351bd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Changelog for Shake (* = breaking change)

#678, fix serious bug in writeFileChanged
0.18.1, released 2019-05-19
#678, fix serious bug in writeFile' - it could delete an unrelated file
#678, fix serious bug in writeFile', deleting the wrong file
0.18, released 2019-05-14
* Make files copied to the shared cache read-only
Delete files before writing, giving symlink/readonly safety
Expand Down
2 changes: 1 addition & 1 deletion src/Development/Shake/Internal/Derived.hs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ writeFileChanged name x = liftIO $ do
src <- hGetContents h
return $! src /= x
when b $ do
removeFile_ x -- symlink safety
removeFile_ name -- symlink safety
writeFile name x


Expand Down

0 comments on commit c351bd9

Please sign in to comment.