From 94e4bcbb5efaf86440e89293d80b0a73781fff12 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Mon, 14 Nov 2016 17:41:11 +0800 Subject: [PATCH] BaseTools: FILE DATA to support relative path under Multiple workspace Fix the bug that FILE DATA to support relative path under Multiple workspace. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/GenFds/FdfParser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py index f17a41f94d..2900283737 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -54,7 +54,7 @@ from Common import GlobalData from Common.String import ReplaceMacro import uuid from Common.Misc import tdict - +from Common.MultipleWorkspace import MultipleWorkspace as mws import Common.LongFilePathOs as os from Common.LongFilePathSupport import OpenLongFilePath as open from Capsule import EFI_CERT_TYPE_PKCS7_GUID @@ -3505,6 +3505,9 @@ class FdfParser: AnyFileName = self.__Token self.__VerifyFile(AnyFileName) + if not os.path.isabs(AnyFileName): + AnyFileName = mws.join(GenFdsGlobalVariable.WorkSpaceDir, AnyFileName) + return AnyFileName ## __GetAnyFileStatement() method -- 2.39.2