aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-09-11 16:40:43 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-09-13 14:37:51 +0000
commitfc79d938efd83268970339635cfaa00ce2540bc5 (patch)
tree3c59153446962deb69c11a133f724a26a80c0c02
parent40273101c68f0346553c08ffe5b95ecf38f43cf5 (diff)
RemoteLinux: Fix deployment to root directory
Skip mkdir in this case. Fixes: QTCREATORBUG-29597 Change-Id: I716e2703e3599a71306a9126e0a627a519398937 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/plugins/remotelinux/rsyncdeploystep.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp
index 317b08bb77..e32129fd29 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();