mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
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
This commit is contained in:
parent
af9785a9ed
commit
1e69581335
@ -41,7 +41,7 @@ class MultipleWorkspace(object):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def convertPackagePath(cls, Ws, Path):
|
def convertPackagePath(cls, Ws, Path):
|
||||||
if str(os.path.normcase (Path)).startswith(Ws):
|
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
|
return Path
|
||||||
|
|
||||||
## setWs()
|
## setWs()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user