Skip to content

Commit

Permalink
VFS. Display local file name clash error when syncing in VFS mode.
Browse files Browse the repository at this point in the history
Signed-off-by: allexzander <blackslayer4@gmail.com>
  • Loading branch information
allexzander authored and backportbot[bot] committed May 25, 2021
1 parent da4b016 commit cbd06eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libsync/propagatedownload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ void PropagateDownloadFile::startAfterIsEncryptedIsChecked()
_item->_type = ItemTypeFile;
}
if (_item->_type == ItemTypeVirtualFile) {
if (propagator()->localFileNameClash(_item->_file)) {
done(SyncFileItem::NormalError, tr("File %1 cannot be downloaded because of a local file name clash!").arg(QDir::toNativeSeparators(_item->_file)));
return;
}

qCDebug(lcPropagateDownload) << "creating virtual file" << _item->_file;
auto r = vfs->createPlaceholder(*_item);
if (!r) {
Expand Down

0 comments on commit cbd06eb

Please sign in to comment.