From: David Stainton Date: Mon, 18 Jan 2016 16:06:47 +0000 (+0100) Subject: Add comment about FUDGE_SECONDS and refer to our design doc X-Git-Url: https://git.rkrishnan.org/vdrive/global?a=commitdiff_plain;h=e384237be04dcedb72177edae5c6b44b8872318f;p=tahoe-lafs%2Ftahoe-lafs.git Add comment about FUDGE_SECONDS and refer to our design doc --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 353b8fac..ab9b729e 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -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)