From fc79d938efd83268970339635cfaa00ce2540bc5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 11 Sep 2023 16:40:43 +0200 Subject: [PATCH] RemoteLinux: Fix deployment to root directory Skip mkdir in this case. Fixes: QTCREATORBUG-29597 Change-Id: I716e2703e3599a71306a9126e0a627a519398937 Reviewed-by: Reviewed-by: Jarek Kobus --- src/plugins/remotelinux/rsyncdeploystep.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp index 317b08bb77c..e32129fd299 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.cpp +++ b/src/plugins/remotelinux/rsyncdeploystep.cpp @@ -89,8 +89,13 @@ GroupItem RsyncDeployStep::mkdirTask() { const auto setupHandler = [this](Process &process) { QStringList remoteDirs; - for (const FileToTransfer &file : std::as_const(m_files)) - remoteDirs << file.m_target.parentDir().path(); + for (const FileToTransfer &file : std::as_const(m_files)) { + const QString parentDir = file.m_target.parentDir().path(); + if (!parentDir.isEmpty()) + remoteDirs << parentDir; + } + if (remoteDirs.isEmpty()) + return SetupResult::StopWithDone; remoteDirs.sort(); remoteDirs.removeDuplicates(); process.setCommand({deviceConfiguration()->filePath("mkdir"), @@ -98,6 +103,7 @@ GroupItem RsyncDeployStep::mkdirTask() connect(&process, &Process::readyReadStandardError, this, [this, proc = &process] { handleStdErrData(QString::fromLocal8Bit(proc->readAllRawStandardError())); }); + return SetupResult::Continue; }; const auto errorHandler = [this](const Process &process) { QString finalMessage = process.errorString();