summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorZoltan Arvai <zarvai@inf.u-szeged.hu>2013-12-09 18:09:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-10 17:48:45 +0100
commitd7c5850b3a4c925608ce41360a16b5cae7c96d94 (patch)
tree0965a31f946370a8bdf4b63fb893ae4967a0bf70 /tools
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 repack_locales.py 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 <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/buildscripts/qtwebengine_utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/buildscripts/qtwebengine_utils.py b/tools/buildscripts/qtwebengine_utils.py
index 75ee076f..b68e2ff5 100755
--- a/tools/buildscripts/qtwebengine_utils.py
+++ b/tools/buildscripts/qtwebengine_utils.py
@@ -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):