summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-07-05 15:04:19 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-07-05 14:03:49 +0000
commit576aa75f62bf181044242b7a0f6940666d16da38 (patch)
tree0e02c73061ad9643695b8a27905c7474e8dc6e88
parent79930a541473b2e0f950d040c16ab6f22e4aeef3 (diff)
downloadqtwebengine-chromium-576aa75f62bf181044242b7a0f6940666d16da38.tar.gz
Fix gyp's relative path calculation
Gyp could not calculate the relative path between an two absolute paths with drive letters. Getting rid of the drive letters solves the issue. Change-Id: I4b4a45155b258ae7fe207c961571d27a41949b85 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--chromium/tools/gyp/pylib/gyp/common.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/tools/gyp/pylib/gyp/common.py b/chromium/tools/gyp/pylib/gyp/common.py
index b6875e43efc..1bb23d87791 100644
--- a/chromium/tools/gyp/pylib/gyp/common.py
+++ b/chromium/tools/gyp/pylib/gyp/common.py
@@ -146,6 +146,10 @@ def RelativePath(path, relative_to):
if (os.path.splitdrive(path)[0].lower() !=
os.path.splitdrive(relative_to)[0].lower()):
return path
+ # Now that they are identical, get rid of the drive,
+ # as the algorithm below can not handle it.
+ path = os.path.splitdrive(path)[1]
+ relative_to = os.path.splitdrive(relative_to)[1]
# Split the paths into components.
path_split = path.split(os.path.sep)