]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Merge pull request #225 from david415/2438.magic-folder-stable.8 2438.magic-folder-stable.8
authorDaira Hopwood <daira@jacaranda.org>
Sat, 23 Jan 2016 00:41:04 +0000 (00:41 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Sat, 23 Jan 2016 00:41:04 +0000 (00:41 +0000)
Add comment about FUDGE_SECONDS and refer to our design doc

src/allmydata/frontends/magic_folder.py

index 353b8facc8d2e2ad14d7448667dd20e8bd180353..ab9b729e7f9b678cd22a450aeca9db57076f018b 100644 (file)
@@ -492,6 +492,10 @@ class WriteFileMixin(object):
         finally:
             os.umask(old_mask)
 
+        # FUDGE_SECONDS is used to determine if another process
+        # has written to the same file concurrently. This is described
+        # in the Earth Dragon section of our design document:
+        # docs/proposed/magic-folder/remote-to-local-sync.rst
         os.utime(replacement_path_u, (now, now - self.FUDGE_SECONDS))
         if is_conflict:
             print "0x00 ------------ <><> is conflict; calling _rename_conflicted_file... %r %r" % (abspath_u, replacement_path_u)