note why we use the same directory

This commit is contained in:
Matt Behrens
2014-02-04 21:11:49 -05:00
parent 506730a1be
commit d0ec2690b4

View File

@@ -47,7 +47,8 @@ def patch_files():
# Attempt to replace the file atomically. We do this by
# creating a temporary file in the same directory as the
# original file so we can atomically move the new file over
# the original later.
# the original later. (This is done in the same directory
# because atomic renames do not work across mount points.)
fd, pathname = tempfile.mkstemp(dir=dirname)
fp = os.fdopen(fd, 'w')