From e3c4870feba182bc4565b7481536087dbb785832 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 21 Feb 2020 15:52:04 +0100 Subject: [PATCH] Do not try to find .qmake.conf past the root directory In case of .qmake.conf not existing, this would result in an infinite loop. Change-Id: I577aaed7a502efb7b01dc6b199dcf464358bf5a9 Reviewed-by: Alexandru Croitor --- util/cmake/pro2cmake.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index f5e678acd4a..b46985e582a 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -286,7 +286,11 @@ def find_qmake_conf(project_file_path: str = "") -> str: if os.path.isfile(maybe_file): return maybe_file else: + last_cwd = cwd cwd = os.path.dirname(cwd) + if last_cwd == cwd: + # reached the top level directory, stop looking + break print(f"Warning: could not find .qmake.conf file") return ""