Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-01-13 16:38:13 +0300
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>2021-08-11 20:13:44 +0300
commit6e0a43b5705f684c16beccfc7d4b9b896017aed4 (patch)
treeaa5f6a90ae55482ace945c2c6c3a44e4faaafd91 /src
parent45f3a97997ac78780fe22b43276cd7c46eb64309 (diff)
Fix clash detection with virtual files
Fixes: #8323
Diffstat (limited to 'src')
-rw-r--r--src/libsync/propagatedownload.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsync/propagatedownload.cpp b/src/libsync/propagatedownload.cpp
index f54e41c68..285446ec1 100644
--- a/src/libsync/propagatedownload.cpp
+++ b/src/libsync/propagatedownload.cpp
@@ -448,6 +448,11 @@ void PropagateDownloadFile::startAfterIsEncryptedIsChecked()
}
qCDebug(lcPropagateDownload) << "creating virtual file" << _item->_file;
+ // do a klaas' case clash check.
+ if (propagator()->localFileNameClash(_item->_file)) {
+ done(SyncFileItem::NormalError, tr("File %1 can not be downloaded because of a local file name clash!").arg(QDir::toNativeSeparators(_item->_file)));
+ return;
+ }
auto r = vfs->createPlaceholder(*_item);
if (!r) {
done(SyncFileItem::NormalError, r.error());