summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Behrens <matt@zigg.com>2014-02-04 21:11:49 -0500
committerMatt Behrens <matt@zigg.com>2014-02-04 21:11:49 -0500
commitd0ec2690b47e3f674f997b8093f839e92d0111a6 (patch)
tree717dd0f002fddad6ddca50f6c5938b99c379585d
parent506730a1be916711b8f5a34a2a9cc11f6cc09e45 (diff)
downloadpython-json-patch-d0ec2690b47e3f674f997b8093f839e92d0111a6.tar.gz
note why we use the same directory
-rwxr-xr-xbin/jsonpatch3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/jsonpatch b/bin/jsonpatch
index eb8bdb3..3f01738 100755
--- a/bin/jsonpatch
+++ b/bin/jsonpatch
@@ -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')