From 32c1a085e1ce22c49b61daa97f18a9ff26a0c89b Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 1 Dec 2022 14:34:52 +0100 Subject: [PATCH] in case of a case clash, verify also once the file is downloaded it could be that when starting the download job, no conflict would exists but when receiving the file, a conflict would know exists Signed-off-by: Matthieu Gallien --- src/libsync/propagatedownload.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp index 70148d0675678..bc174eaaf3dc2 100644 --- a/src/libsync/propagatedownload.cpp +++ b/src/libsync/propagatedownload.cpp @@ -1146,7 +1146,12 @@ void PropagateDownloadFile::downloadFinished() qCWarning(lcPropagateDownload()) << "invalid modified time" << _item->_file << _item->_modtime; } - bool previousFileExists = FileSystem::fileExists(filename); + if (propagator()->localFileNameClash(_item->_file)) { + _item->_instruction = CSYNC_INSTRUCTION_CASE_CLASH_CONFLICT; + qCInfo(lcPropagateDownload) << "setting instruction to" << _item->_instruction << _item->_file; + } + + bool previousFileExists = FileSystem::fileExists(filename) && _item->_instruction != CSYNC_INSTRUCTION_CASE_CLASH_CONFLICT; if (previousFileExists) { // Preserve the existing file permissions. QFileInfo existingFile(filename);