]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Teach Uploader to ignore files unless they've changed
authorDavid Stainton <dstainton415@gmail.com>
Fri, 25 Sep 2015 08:39:57 +0000 (10:39 +0200)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 1 Oct 2015 00:19:49 +0000 (01:19 +0100)
- specifically we compare the ctime, mtime and size with the
entry in magic-folder db.

src/allmydata/frontends/magic_folder.py

index 1ca638e874682d0c8d751f81420091e8fa9bafd2..11590d569fc5a77204938168e55699c70473005c 100644 (file)
@@ -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)