forked from qt-creator/qt-creator
Docker: Fix ensureReachable return value
DockerDevice::ensureReachable returned false in case a path was already mounted. Change-Id: I7b378a063dfe5380a1ead648f89911f2225c6338 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -725,6 +725,7 @@ bool DockerDevicePrivate::startContainer()
|
||||
connect(m_shell.get(), &DeviceShell::done, this, [this](const ProcessResultData &resultData) {
|
||||
if (m_shell)
|
||||
m_shell.release()->deleteLater();
|
||||
|
||||
if (resultData.m_error != QProcess::UnknownError
|
||||
|| resultData.m_exitStatus == QProcess::NormalExit)
|
||||
return;
|
||||
@@ -1248,12 +1249,18 @@ bool DockerDevicePrivate::ensureReachable(const FilePath &other)
|
||||
const FilePath fMount = FilePath::fromString(mount);
|
||||
if (other.isChildOf(fMount))
|
||||
return true;
|
||||
|
||||
if (fMount == other)
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const auto &[path, containerPath] : m_temporaryMounts) {
|
||||
if (path.path() != containerPath.path())
|
||||
continue;
|
||||
|
||||
if (path == other)
|
||||
return true;
|
||||
|
||||
if (other.isChildOf(path))
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user