From 0015c666d2a6646cb58b9b73e839a9b52c64d71e Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 28 Mar 2023 07:53:57 +0200 Subject: [PATCH] Docker: Fix ensureReachable return value DockerDevice::ensureReachable returned false in case a path was already mounted. Change-Id: I7b378a063dfe5380a1ead648f89911f2225c6338 Reviewed-by: hjk Reviewed-by: --- src/plugins/docker/dockerdevice.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index f1b650268e5..fa66c344492 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -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; }