From: David Stainton Date: Fri, 25 Sep 2015 08:39:57 +0000 (+0200) Subject: Teach Uploader to ignore files unless they've changed X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/copyable.html?a=commitdiff_plain;h=fdbb64b2626689b1a1a6fbdf72b33b8f996d7332;p=tahoe-lafs%2Ftahoe-lafs.git Teach Uploader to ignore files unless they've changed - specifically we compare the ctime, mtime and size with the entry in magic-folder db. --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 1ca638e8..11590d56 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -336,6 +336,8 @@ class Uploader(QueueMixin): version = 0 elif self._db.is_new_file_time(abspath_u, relpath_u): version += 1 + else: + return None uploadable = FileName(abspath_u, self._client.convergence) d2 = self._upload_dirnode.add_file(encoded_name_u, uploadable, metadata={"version":version}, overwrite=True)