aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/os/mac/xcode.rb
diff options
context:
space:
mode:
authorJack Nagel2014-09-20 17:11:16 -0500
committerJack Nagel2014-09-20 17:11:16 -0500
commit2d16f8c202dc080056262bade9417f249a4ba827 (patch)
tree24c9f86cc1a4ab4ad163d3ce3177c7d21e0d8a6e /Library/Homebrew/os/mac/xcode.rb
parent6ad82e65da50b3ebd86dffa3e27e31b0f6dac318 (diff)
downloadbrew-2d16f8c202dc080056262bade9417f249a4ba827.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/Homebrew/os/mac/xcode.rb')
0 files changed, 0 insertions, 0 deletions