From 4243801f58eb9fe04835f9903097b6c53a986c7d Mon Sep 17 00:00:00 2001 From: meejah Date: Mon, 26 Oct 2015 08:59:14 -0600 Subject: [PATCH] change if/else block to be the same in exists/not-exists branches --- src/allmydata/frontends/magic_folder.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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, -- 2.45.2