last_downloaded_uri = self._db.get_last_downloaded_uri(relpath_u)
current_version = self._db.get_local_file_version(relpath_u)
- if current_version is None:
+ if not self._db.is_new_file(pathinfo, relpath_u):
+ self._log("ignoring {}".format(relpath_u))
+ return
+ elif current_version is None:
new_version = 0
else:
new_version = current_version + 1
1
)
+ print("BOB DELETE")
# now bob deletes it (bob should upload, alice download)
bob_proc = self.bob_magicfolder.uploader.set_hook('processed')
alice_proc = self.alice_magicfolder.downloader.set_hook('processed')
yield self._check_version_in_dmd(self.alice_magicfolder, u"blam", 1)
yield self._check_version_in_local_db(self.alice_magicfolder, u"blam", 1)
+ print("ALICE RESTORE")
# now alice restores it (alice should upload, bob download)
alice_proc = self.alice_magicfolder.uploader.set_hook('processed')
bob_proc = self.bob_magicfolder.downloader.set_hook('processed')