forked from qt-creator/qt-creator
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:
@@ -121,15 +121,9 @@ public:
|
||||
: m_dev(dev)
|
||||
{}
|
||||
|
||||
RunResult runInShell(const QString &executable,
|
||||
const QStringList &arguments,
|
||||
RunResult runInShell(const CommandLine &cmdLine,
|
||||
const QByteArray &stdInData) const override;
|
||||
|
||||
std::optional<QByteArray> fileContents(
|
||||
const FilePath &filePath,
|
||||
qint64 limit,
|
||||
qint64 offset) const override;
|
||||
|
||||
DockerDevicePrivate *m_dev = nullptr;
|
||||
};
|
||||
|
||||
@@ -352,22 +346,11 @@ Tasks DockerDevicePrivate::validateMounts() const
|
||||
return result;
|
||||
}
|
||||
|
||||
RunResult DockerDeviceFileAccess::runInShell(
|
||||
const QString &executable,
|
||||
const QStringList &arguments,
|
||||
const QByteArray &stdInData) const
|
||||
RunResult DockerDeviceFileAccess::runInShell(const CommandLine &cmdLine,
|
||||
const QByteArray &stdInData) const
|
||||
{
|
||||
QTC_ASSERT(m_dev, return {});
|
||||
return m_dev->runInShell({FilePath::fromString(executable), arguments}, stdInData);
|
||||
}
|
||||
|
||||
std::optional<QByteArray> DockerDeviceFileAccess::fileContents(
|
||||
const FilePath &filePath,
|
||||
qint64 limit,
|
||||
qint64 offset) const
|
||||
{
|
||||
m_dev->updateContainerAccess();
|
||||
return UnixDeviceFileAccess::fileContents(filePath, limit, offset);
|
||||
return m_dev->runInShell(cmdLine, stdInData);
|
||||
}
|
||||
|
||||
DockerDevice::DockerDevice(DockerSettings *settings, const DockerDeviceData &data)
|
||||
|
||||
Reference in New Issue
Block a user