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/simplejson/components/%22file:/something?a=commitdiff_plain;h=4bd52a90a5cbce573c0d7f09eeedcda3ef3473bc;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)