Docker: Fix logic and Qt6 build

Change-Id: I3f0ec2cc86f48578e9dcd2ebfaa685cc577141c3
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-07-22 10:33:23 +02:00
parent c59bddd4df
commit dfb0edf4ce

View File

@@ -1200,7 +1200,7 @@ bool DockerDevice::removeRecursively(const FilePath &filePath) const
// We are expecting this only to be called in a context of build directories or similar.
// Chicken out in some cases that _might_ be user code errors.
QTC_ASSERT(path.startsWith('/'), return false);
const int levelsNeeded = path.startsWith("/home/" ? 4 : 3);
const int levelsNeeded = path.startsWith("/home/") ? 4 : 3;
QTC_ASSERT(path.count('/') >= levelsNeeded, return false);
return d->runInContainer({"rm", {"-rf", "--", path}});