From: meejah Date: Mon, 26 Oct 2015 14:59:14 +0000 (-0600) Subject: change if/else block to be the same in exists/not-exists branches X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=4243801f58eb9fe04835f9903097b6c53a986c7d;p=tahoe-lafs%2Ftahoe-lafs.git change if/else block to be the same in exists/not-exists branches --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 3006ce67..4bfa16f1 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -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,