From d0ec2690b47e3f674f997b8093f839e92d0111a6 Mon Sep 17 00:00:00 2001 From: Matt Behrens Date: Tue, 4 Feb 2014 21:11:49 -0500 Subject: note why we use the same directory --- bin/jsonpatch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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') -- cgit v1.2.1