From 97058144294759ffb64005a8543d5dd9a5bdc1fc Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 13 Oct 2017 10:47:24 +0800 Subject: BaseTools: Fix a bug Build directory should relative to WORKSPACE The bug is for build output files it still use mws.join function, it cause maybe we will get the build output files in the PACKAGES_PATH because mws.join will try WORKSPACE first, if the file doesn't exist then try PACKAGES_PATH. But for build output, we expected it should relative to WORKSPACE. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/Common/String.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/String.py') diff --git a/BaseTools/Source/Python/Common/String.py b/BaseTools/Source/Python/Common/String.py index 81c053df27..4a8c03e88e 100644 --- a/BaseTools/Source/Python/Common/String.py +++ b/BaseTools/Source/Python/Common/String.py @@ -311,7 +311,7 @@ def NormPath(Path, Defines={}): # To local path format # Path = os.path.normpath(Path) - if Path.startswith(GlobalData.gWorkspace) and not os.path.exists(Path): + if Path.startswith(GlobalData.gWorkspace) and not Path.startswith(GlobalData.gBuildDirectory) and not os.path.exists(Path): Path = Path[len (GlobalData.gWorkspace):] if Path[0] == os.path.sep: Path = Path[1:] -- cgit v1.2.3