summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2015-10-14 09:43:43 +0000
committerlgao4 <lgao4@Edk2>2015-10-14 09:43:43 +0000
commit1e69581335354a7df3bc07b21e495b0b3c5909c0 (patch)
treee5186c8878e8d831c81070338de2a78cbb86b1ad /BaseTools/Source/Python
parentaf9785a9ed61daea52b47f0bf448f1f228beee1e (diff)
downloadedk2-platforms-1e69581335354a7df3bc07b21e495b0b3c5909c0.tar.xz
BaseTools: Fix the issue to support windows root directory
Use os.path.relpath to get the relative directory instead of directly trim it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18602 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python')
-rw-r--r--BaseTools/Source/Python/Common/MultipleWorkspace.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/MultipleWorkspace.py b/BaseTools/Source/Python/Common/MultipleWorkspace.py
index 8088404f30..feb1f8d5eb 100644
--- a/BaseTools/Source/Python/Common/MultipleWorkspace.py
+++ b/BaseTools/Source/Python/Common/MultipleWorkspace.py
@@ -41,7 +41,7 @@ class MultipleWorkspace(object):
@classmethod
def convertPackagePath(cls, Ws, Path):
if str(os.path.normcase (Path)).startswith(Ws):
- return os.path.join(Ws, Path[len(Ws) + 1:])
+ return os.path.join(Ws, os.path.relpath(Path, Ws))
return Path
## setWs()