Utils: Fix iterateWithFind

The change of runInShell to take QString + QStringList meant
that the caller was no longer able to fine tune the argument
escaping. This lead to "find -exec ... \;" being escaped incorrectly.

Changing back to CommandLine fixes this.

Change-Id: I55b09bd745c09912a2a0b4e43432824a99c0dd4e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-10-14 13:39:16 +02:00
parent 679a726330
commit a1e960a27c
4 changed files with 43 additions and 68 deletions

View File

@@ -359,8 +359,7 @@ public:
: m_dev(dev)
{}
RunResult runInShell(const QString &executable,
const QStringList &arguments,
RunResult runInShell(const CommandLine &cmdLine,
const QByteArray &stdInData) const override;
LinuxDevicePrivate *m_dev;
@@ -386,11 +385,10 @@ public:
LinuxDeviceFileAccess m_fileAccess{this};
};
RunResult LinuxDeviceFileAccess::runInShell(const QString &executable,
const QStringList &arguments,
RunResult LinuxDeviceFileAccess::runInShell(const CommandLine &cmdLine,
const QByteArray &stdInData) const
{
return m_dev->runInShell({FilePath::fromString(executable), arguments}, stdInData);
return m_dev->runInShell(cmdLine, stdInData);
}
// SshProcessImpl