Add comment about FUDGE_SECONDS and refer to our design doc
authorDavid Stainton <dstainton415@gmail.com>
Mon, 18 Jan 2016 16:06:47 +0000 (17:06 +0100)
committerDavid Stainton <dstainton415@gmail.com>
Thu, 21 Jan 2016 17:09:43 +0000 (18:09 +0100)
src/allmydata/frontends/magic_folder.py

index 5775514cf3df0d51d067307a6d9655893813abc1..323e926f974a64b9348021306a194364dc38d774 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)