]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: FILE DATA to support relative path under Multiple workspace
authorYonghong Zhu <yonghong.zhu@intel.com>
Mon, 14 Nov 2016 09:41:11 +0000 (17:41 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 15 Nov 2016 02:23:22 +0000 (10:23 +0800)
Fix the bug that FILE DATA to support relative path under Multiple
workspace.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/GenFds/FdfParser.py

index f17a41f94df69ffe116f851c19d8889f753ba74e..29002837372c9f5f23b3d6bdc1e94840058ff1dd 100644 (file)
@@ -54,7 +54,7 @@ from Common import GlobalData
 from Common.String import ReplaceMacro\r
 import uuid\r
 from Common.Misc import tdict\r
-\r
+from Common.MultipleWorkspace import MultipleWorkspace as mws\r
 import Common.LongFilePathOs as os\r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
 from Capsule import EFI_CERT_TYPE_PKCS7_GUID\r
@@ -3505,6 +3505,9 @@ class FdfParser:
         AnyFileName = self.__Token\r
         self.__VerifyFile(AnyFileName)\r
 \r
+        if not os.path.isabs(AnyFileName):\r
+            AnyFileName = mws.join(GenFdsGlobalVariable.WorkSpaceDir, AnyFileName)\r
+\r
         return AnyFileName\r
 \r
     ## __GetAnyFileStatement() method\r