once we call done on a sync file item, return is needed
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 14 Sep 2023 09:58:00 +0000 (11:58 +0200)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Thu, 14 Sep 2023 11:58:47 +0000 (11:58 +0000)
will avoid calling done method multiple times on a signle file item
causing a crash via ENFORCE function

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/propagatedownload.cpp

index 08ab4848915019f8ee594ed0bf3803af1080c1e9..8b78b2ab9acb8fc3c8f9978569d7fc98d2452e6c 100644 (file)
@@ -1226,6 +1226,7 @@ void PropagateDownloadFile::downloadFinished()
             QString error;
             if (!propagator()->createConflict(_item, _associatedComposite, &error)) {
                 done(SyncFileItem::SoftError, error, ErrorCategory::GenericError);
+                return;
             } else {
                 previousFileExists = false;
             }