Skip to content

Commit d0ec269

Browse files
committed
note why we use the same directory
1 parent 506730a commit d0ec269

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/jsonpatch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ def patch_files():
4747
# Attempt to replace the file atomically. We do this by
4848
# creating a temporary file in the same directory as the
4949
# original file so we can atomically move the new file over
50-
# the original later.
50+
# the original later. (This is done in the same directory
51+
# because atomic renames do not work across mount points.)
5152

5253
fd, pathname = tempfile.mkstemp(dir=dirname)
5354
fp = os.fdopen(fd, 'w')

0 commit comments

Comments
 (0)