From: alex-z Date: Tue, 6 Sep 2022 14:15:53 +0000 (+0300) Subject: Set '_abortRequested' properly within the propagator so the error is not displayed... X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~291^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e081f0ba72b52c9d1db397cdfb087132ca85211f;p=nextcloud-desktop.git Set '_abortRequested' properly within the propagator so the error is not displayed in UI. Signed-off-by: alex-z --- diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 245a8e8d6..0591483cf 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -482,6 +482,8 @@ void OwncloudPropagator::start(SyncFileItemVector &&items) { Q_ASSERT(std::is_sorted(items.begin(), items.end())); + _abortRequested = false; + /* This builds all the jobs needed for the propagation. * Each directory is a PropagateDirectory job, which contains the files in it. * In order to do that we loop over the items. (which are sorted by destination) diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index 79d017e82..951a63d5a 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -538,6 +538,8 @@ public: { if (_abortRequested) return; + + _abortRequested = true; if (_rootJob) { // Connect to abortFinished which signals that abort has been asynchronously finished connect(_rootJob.data(), &PropagateDirectory::abortFinished, this, &OwncloudPropagator::emitFinished); @@ -633,6 +635,7 @@ private slots: { if (!_finishedEmited) emit finished(status == SyncFileItem::Success); + _abortRequested = false; _finishedEmited = true; }