From 0a2510edcbbae049c46a27c3b486214bbd493660 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 3 Aug 2022 12:02:37 +0200 Subject: [PATCH] Python: skip root on venv detection Virtual environments on the root level are uncommon and can cause issues on some linux distros. Fixes: QTCREATORBUG-27976 Change-Id: I266f1b321c1c2d2b4b416acf3f34ce8c1d686219 Reviewed-by: Christian Stenger --- src/plugins/python/pythonsettings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/python/pythonsettings.cpp b/src/plugins/python/pythonsettings.cpp index ce6af38ef25..8f7537c8b77 100644 --- a/src/plugins/python/pythonsettings.cpp +++ b/src/plugins/python/pythonsettings.cpp @@ -930,7 +930,7 @@ QList PythonSettings::detectPythonVenvs(const FilePath &path) dir.cdUp(); } } - } while (dir.cdUp()); + } while (dir.cdUp() && !(dir.isRoot() && Utils::HostOsInfo::isAnyUnixHost())); } return result; }