GenericDeployStep: Fix rsync step

Don't use a copy of m_files for mkdirTask(), as m_files is
modified by the running recipe. So, when the recipe is prepared,
the m_files doesn't contain the right data, yet.

This is going to be refactored in master, as it seems the
isDeploymentNecessary() operating on mutable internals
is confusing.

Fixes: QTCREATORBUG-29609
Change-Id: I3f34584ffd9486322e8b26f95ac72b96a9306f8b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2023-10-23 16:13:51 +02:00
parent 8da7d88e3a
commit 4645c713d2

View File

@@ -90,9 +90,9 @@ GroupItem GenericDeployStep::mkdirTask()
{
using ResultType = expected_str<void>;
const auto onSetup = [files = m_files](Async<ResultType> &async) {
const auto onSetup = [this](Async<ResultType> &async) {
FilePaths remoteDirs;
for (const FileToTransfer &file : std::as_const(files))
for (const FileToTransfer &file : std::as_const(m_files))
remoteDirs << file.m_target.parentDir();
FilePath::sort(remoteDirs);