diff options
author | Matt Behrens <matt@zigg.com> | 2014-02-04 21:11:49 -0500 |
---|---|---|
committer | Matt Behrens <matt@zigg.com> | 2014-02-04 21:11:49 -0500 |
commit | d0ec2690b47e3f674f997b8093f839e92d0111a6 (patch) | |
tree | 717dd0f002fddad6ddca50f6c5938b99c379585d | |
parent | 506730a1be916711b8f5a34a2a9cc11f6cc09e45 (diff) | |
download | python-json-patch-d0ec2690b47e3f674f997b8093f839e92d0111a6.tar.gz |
note why we use the same directory
-rwxr-xr-x | bin/jsonpatch | 3 |
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') |