]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
change if/else block to be the same in exists/not-exists branches
authormeejah <meejah@meejah.ca>
Mon, 26 Oct 2015 14:59:14 +0000 (08:59 -0600)
committermeejah <meejah@meejah.ca>
Mon, 26 Oct 2015 14:59:14 +0000 (08:59 -0600)
src/allmydata/frontends/magic_folder.py

index 3006ce679f8c3c2fdd0c07070b33fcef0639850b..4bfa16f1c52467bb5cd55888d942abb142307cb2 100644 (file)
@@ -320,13 +320,13 @@ class Uploader(QueueMixin):
                 last_downloaded_uri = self._db.get_last_downloaded_uri(relpath_u)
 
                 current_version = self._db.get_local_file_version(relpath_u)
-                if not self._db.is_new_file(pathinfo, relpath_u):
-                    self._log("ignoring {}".format(relpath_u))
-                    return
-                elif current_version is None:
+                if current_version is None:
                     new_version = 0
-                else:
+                elif self._db.is_new_file(pathinfo, relpath_u):
                     new_version = current_version + 1
+                else:
+                    self._log("ignoring {}".format(relpath_u))
+                    return
 
                 metadata = { 'version': new_version,
                              'deleted': True,