mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-12 16:02:43 +00:00
re-jig 'the logic'
This commit is contained in:
parent
6d5355fda3
commit
fbc142d346
@ -1403,23 +1403,26 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
db_entry.ctime_ns != current_statinfo.ctime_ns or \
|
db_entry.ctime_ns != current_statinfo.ctime_ns or \
|
||||||
db_entry.size != current_statinfo.size):
|
db_entry.size != current_statinfo.size):
|
||||||
is_conflict = True
|
is_conflict = True
|
||||||
self._log("conflict because local change")
|
self._log("conflict because local change0")
|
||||||
|
|
||||||
if db_entry.last_uploaded_uri is None:
|
if db_entry.last_downloaded_uri is None \
|
||||||
pass
|
or db_entry.last_uploaded_uri is None \
|
||||||
elif db_entry.last_downloaded_uri is None:
|
or dmd_last_downloaded_uri is None:
|
||||||
pass
|
# we've never downloaded anything before for this
|
||||||
else:
|
# file, but the other side might have created a new
|
||||||
if dmd_last_downloaded_uri is None:
|
# file "at the same time"
|
||||||
# we've never downloaded anything before for this
|
if db_entry.version >= item.metadata['version']:
|
||||||
# file, but the other side might have created a new
|
self._log("conflict because my version >= remote version")
|
||||||
# file "at the same time"
|
|
||||||
if db_entry.version >= item.metadata['version']:
|
|
||||||
self._log("conflict because my version >= remote version")
|
|
||||||
is_conflict = True
|
|
||||||
elif dmd_last_downloaded_uri != db_entry.last_downloaded_uri:
|
|
||||||
is_conflict = True
|
is_conflict = True
|
||||||
self._log("conflict because dmd_last_downloaded_uri != db_entry.last_downloaded_uri")
|
elif dmd_last_downloaded_uri != db_entry.last_downloaded_uri:
|
||||||
|
is_conflict = True
|
||||||
|
self._log("conflict because dmd_last_downloaded_uri != db_entry.last_downloaded_uri")
|
||||||
|
self._log("{} != {}".format(dmd_last_downloaded_uri, db_entry.last_downloaded_uri))
|
||||||
|
|
||||||
|
else: # no local db_entry .. but has the file appeared locally meantime?
|
||||||
|
if current_statinfo.exists:
|
||||||
|
is_conflict = True
|
||||||
|
self._log("conflict because local change1")
|
||||||
|
|
||||||
if is_conflict:
|
if is_conflict:
|
||||||
self._count('objects_conflicted')
|
self._count('objects_conflicted')
|
||||||
|
Loading…
Reference in New Issue
Block a user