Revision: 18602
http://sourceforge.net/p/edk2/code/18602
Author: lgao4
Date: 2015-10-14 09:43:43 +0000 (Wed, 14 Oct 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Yonghong Zhu <[email protected]>
Modified Paths:
--------------
trunk/edk2/BaseTools/Source/Python/Common/MultipleWorkspace.py
Modified: trunk/edk2/BaseTools/Source/Python/Common/MultipleWorkspace.py
===================================================================
--- trunk/edk2/BaseTools/Source/Python/Common/MultipleWorkspace.py
2015-10-12 06:02:09 UTC (rev 18601)
+++ trunk/edk2/BaseTools/Source/Python/Common/MultipleWorkspace.py
2015-10-14 09:43:43 UTC (rev 18602)
@@ -41,7 +41,7 @@
@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()
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits