aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2014-09-20 17:11:16 -0500
committerJack Nagel2014-09-20 17:11:16 -0500
commit42c2b474b5739c30406bd79cc91672dd3b7aa4fb (patch)
tree8a44395126fb81372be6cede9d33cd353556ee73 /Library/Formula
parent5c751175aeef5458eebc4b1ab2c19473237ffb92 (diff)
downloadhomebrew-42c2b474b5739c30406bd79cc91672dd3b7aa4fb.tar.bz2
Make Pathname#atomic_write truly atomic
As we know, files cannot be moved across filesystems atomically. In that case, FileUtils.mv will make a copy. But if we create the temp file in the same directory as the target, we can avoid this and use File.rename directly. Additionally, the rename should be the absolute last step, so that the original file is preserved if altering ownership and permissions fails.
Diffstat (limited to 'Library/Formula')
0 files changed, 0 insertions, 0 deletions