mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-26 06:09:21 +00:00
Fix pending upload conflict detection.
Author: David Stainton <david@leastauthority.com> Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
b5bbfe55ab
commit
9044ae63d1
@ -266,7 +266,7 @@ class Uploader(QueueMixin):
|
|||||||
|
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def is_pending(relpath_u):
|
def is_pending(self, relpath_u):
|
||||||
return relpath_u in self._pending
|
return relpath_u in self._pending
|
||||||
|
|
||||||
def _notify(self, opaque, path, events_mask):
|
def _notify(self, opaque, path, events_mask):
|
||||||
@ -717,7 +717,7 @@ class Downloader(QueueMixin, WriteFileMixin):
|
|||||||
dmd_last_uploaded_uri = metadata.get('last_uploaded_uri', None)
|
dmd_last_uploaded_uri = metadata.get('last_uploaded_uri', None)
|
||||||
local_last_uploaded_uri = self._db.get_last_uploaded_uri(relpath_u)
|
local_last_uploaded_uri = self._db.get_last_uploaded_uri(relpath_u)
|
||||||
print ">>>> if %r != %r" % (dmd_last_uploaded_uri, local_last_uploaded_uri)
|
print ">>>> if %r != %r" % (dmd_last_uploaded_uri, local_last_uploaded_uri)
|
||||||
if dmd_last_uploaded_uri != local_last_uploaded_uri:
|
if dmd_last_uploaded_uri is not None and dmd_last_uploaded_uri != local_last_uploaded_uri:
|
||||||
is_conflict = True
|
is_conflict = True
|
||||||
self._count('objects_conflicted')
|
self._count('objects_conflicted')
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user