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

github.com/owncloud/client.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
committerHannah von Reth <vonreth@kde.org>2021-01-19 10:59:49 +0300
commite25f1b27b995bb050e7a5cf9108f8895923b65d6 (patch)
treeb7a761f8a6a4d0d3a75ac99864281ec8f5e75e48 /src
parenta9c7420e4cf743b780594a138b2c3d43e73efa9d (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 c75426e02..194fc1cbc 100644
--- a/src/libsync/propagatedownload.cpp
+++ b/src/libsync/propagatedownload.cpp
@@ -381,6 +381,11 @@ void PropagateDownloadFile::start()
}
if (_item->_type == ItemTypeVirtualFile) {
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());