Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Unified Diff: pylib/gyp/common.py

Issue 18991011: On Windows, don't try to create relative paths across different drives (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: remove .exe Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/common.py
===================================================================
--- pylib/gyp/common.py (revision 1672)
+++ pylib/gyp/common.py (working copy)
@@ -131,6 +131,13 @@
path = os.path.realpath(path)
relative_to = os.path.realpath(relative_to)
+ # On Windows, we can't create a relative path to a different drive, so just
+ # use the absolute path.
+ if sys.platform == 'win32':
+ if (os.path.splitdrive(path)[0].lower() !=
+ os.path.splitdrive(relative_to)[0].lower()):
+ return path
+
# Split the paths into components.
path_split = path.split(os.path.sep)
relative_to_split = relative_to.split(os.path.sep)
« no previous file with comments | « no previous file | test/win/generator-output-different-drive/gyptest-generator-output-different-drive.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698