]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/GenMetaFile/GenInfFile.py
BaseTool/Upt: Avoid UNI file name conflict
[mirror_edk2.git] / BaseTools / Source / Python / UPT / GenMetaFile / GenInfFile.py
index a131f98ead73bf9afb5e7ab7eec9c635a0af44c5..c1362e6fb3d953b9e9950949fb92c843e05cc8a9 100644 (file)
@@ -2,7 +2,7 @@
 #\r
 # This file contained the logical of transfer package object to INF files.\r
 #\r
-# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -41,6 +41,7 @@ import Logger.Log as Logger
 from Library import DataType as DT\r
 from GenMetaFile import GenMetaFileMisc\r
 from Library.UniClassObject import FormatUniEntry\r
+from Library.String import GetUniFileName\r
 \r
 \r
 ## Transfer Module Object to Inf files\r
@@ -225,8 +226,8 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD
         return\r
     else:\r
         ModuleObject.UNIFlag = True\r
-    ContainerFile = os.path.normpath(os.path.join(os.path.dirname(ModuleObject.GetFullPath()),\r
-                                                  (ModuleObject.GetBaseName() + '.uni')))\r
+    ContainerFile = GetUniFileName(os.path.dirname(ModuleObject.GetFullPath()), ModuleObject.GetBaseName())\r
+\r
     if not os.path.exists(os.path.dirname(ModuleObject.GetFullPath())):\r
         os.makedirs(os.path.dirname(ModuleObject.GetFullPath()))\r
 \r