path: root/tools/buildscripts
diff options
authorZoltan Arvai <>2013-12-09 18:09:34 +0100
committerThe Qt Project <>2013-12-10 17:48:45 +0100
commitd7c5850b3a4c925608ce41360a16b5cae7c96d94 (patch)
tree0965a31f946370a8bdf4b63fb893ae4967a0bf70 /tools/buildscripts
parent84fc0e2476ddfc7a5eb2750f3c9b8679a01f948c (diff)
Fix wrong cwd in getChromiumSrcDir().
Working directory can be wrong when calling getChromiumSrcDir. On Windows cwd is inside Chrome source directory when it called from that causes git config to return empty value. This causes the function to fall back to snapshot directory even if upstream is used. Changing cwd to qtwebengine_root, running git config and restoring original cwd resolves the problem. Change-Id: I1bef84ce791f63d3c9e7d6c9506e99c0c53cfc3e Reviewed-by: Pierre Rossi <> Reviewed-by: Andras Becsi <>
Diffstat (limited to 'tools/buildscripts')
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/buildscripts/ b/tools/buildscripts/
index 75ee076f9..b68e2ff50 100755
--- a/tools/buildscripts/
+++ b/tools/buildscripts/
@@ -47,9 +47,13 @@ import sys
def getChromiumSrcDir():
+ saved_cwd = os.getcwd()
qtwebengine_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
+ os.chdir(qtwebengine_root)
chrome_src = subprocess.check_output("git config qtwebengine.chromiumsrcdir || true", shell=True).strip()
+ os.chdir(saved_cwd)
if chrome_src:
chrome_src = os.path.join(qtwebengine_root, chrome_src)
if not chrome_src or not os.path.isdir(chrome_src):