From 571ee0c3bf4a97b82dbe3ce02506037feb751d75 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 29 Aug 2025 10:12:25 +0200 Subject: [PATCH] fix: fix small issues from review on bulk download job Signed-off-by: Matthieu Gallien --- src/libsync/bulkpropagatordownloadjob.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libsync/bulkpropagatordownloadjob.cpp b/src/libsync/bulkpropagatordownloadjob.cpp index 35896f8e2c..7b5e3a9766 100644 --- a/src/libsync/bulkpropagatordownloadjob.cpp +++ b/src/libsync/bulkpropagatordownloadjob.cpp @@ -126,7 +126,6 @@ void BulkPropagatorDownloadJob::finalizeOneFile(const SyncFileItemPtr &file) emit propagator()->itemCompleted(file, ErrorCategory::GenericError); _filesToDownload.erase(foundIt); } - checkPropagationIsDone(); } void BulkPropagatorDownloadJob::checkPropagationIsDone() @@ -145,13 +144,12 @@ bool BulkPropagatorDownloadJob::start() } for (const auto &fileToDownload : std::as_const(_filesToDownload)) { - Q_ASSERT(fileToDownload->_type == ItemTypeVirtualFileDehydration || fileToDownload->_type == ItemTypeVirtualFile); + Q_ASSERT(fileToDownload->_type == ItemTypeVirtualFile); if (propagator()->localFileNameClash(fileToDownload->_file)) { - _parentDirJob->appendTask(fileToDownload); finalizeOneFile(fileToDownload); - qCCritical(lcBulkPropagatorDownloadJob) << "File" << QDir::toNativeSeparators(fileToDownload->_file) << "can not be downloaded because it is non virtual!"; - abortWithError(fileToDownload, SyncFileItem::NormalError, tr("File %1 cannot be downloaded because it is non virtual!").arg(QDir::toNativeSeparators(fileToDownload->_file))); + qCWarning(lcBulkPropagatorDownloadJob) << "File" << QDir::toNativeSeparators(fileToDownload->_file) << "can not be downloaded because of a local file name clash!"; + abortWithError(fileToDownload, SyncFileItem::FileNameClash, tr("File %1 can not be downloaded because of a local file name clash!").arg(QDir::toNativeSeparators(fileToDownload->_file))); return false; } }