From fd39ea9ef9a6a4c8a19a0ad730f5ddfe22b0a1fe Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 2 Dec 2019 17:55:22 +0100 Subject: [PATCH] RemoteLinux: Fix deployment of directories via rsync If the source path is a directory, we need to append a slash to tell rsync that it should not interpret the target file path as the parent directory. Fixes: QTCREATORBUG-23235 Change-Id: I8bf0737ecf710e6a1c341cf6559b34f6b1d64e38 Reviewed-by: hjk --- src/plugins/remotelinux/rsyncdeploystep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/remotelinux/rsyncdeploystep.cpp b/src/plugins/remotelinux/rsyncdeploystep.cpp index edef505f1ac..b1158f2bba4 100644 --- a/src/plugins/remotelinux/rsyncdeploystep.cpp +++ b/src/plugins/remotelinux/rsyncdeploystep.cpp @@ -159,7 +159,7 @@ void RsyncDeployService::deployNextFile() const DeployableFile file = m_deployableFiles.takeFirst(); const RsyncCommandLine cmdLine = RsyncDeployStep::rsyncCommand(*connection(), m_flags); const QStringList args = QStringList(cmdLine.options) - << file.localFilePath().toString() + << (file.localFilePath().toString() + (file.localFilePath().isDir() ? "/" : QString())) << (cmdLine.remoteHostSpec + ':' + file.remoteFilePath()); m_rsync.start("rsync", args); // TODO: Get rsync location from settings? }