if BulkPropagatorJob abort after an error emit finished signal
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 25 Nov 2021 09:17:47 +0000 (10:17 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 26 Nov 2021 11:48:38 +0000 (12:48 +0100)
prevent sync engine being stuck because of an error when preparing bulk
upload

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

index 3803bd5eed74f95c7fa2efe18a90963a64178da0..3aa8b76a2ee0c4109d2c0997e1664bc2b016f3d4 100644 (file)
@@ -194,8 +194,10 @@ void BulkPropagatorJob::triggerUpload()
             if (FileSystem::isFileLocked(singleFile._localPath)) {
                 emit propagator()->seenLockedFile(singleFile._localPath);
             }
-            // Soft error because this is likely caused by the user modifying his files while syncing
-            abortWithError(singleFile._item, SyncFileItem::SoftError, device->errorString());
+
+            abortWithError(singleFile._item, SyncFileItem::NormalError, device->errorString());
+            emit finished(SyncFileItem::NormalError);
+
             return;
         }
         singleFile._headers["X-File-Path"] = singleFile._remotePath.toUtf8();