BaseTools/UPT: Fix a install issue
Fix a corner case issue of installing a module without any files which causes installing UNI file failure Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -962,7 +962,12 @@ def IsMatchArch(Arch1, Arch2):
|
|||||||
# Return the FileName with index +1 under the FilePath
|
# Return the FileName with index +1 under the FilePath
|
||||||
#
|
#
|
||||||
def GetUniFileName(FilePath, FileName):
|
def GetUniFileName(FilePath, FileName):
|
||||||
|
Files = []
|
||||||
|
try:
|
||||||
Files = os.listdir(FilePath)
|
Files = os.listdir(FilePath)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
LargestIndex = -1
|
LargestIndex = -1
|
||||||
for File in Files:
|
for File in Files:
|
||||||
if File.upper().startswith(FileName.upper()) and File.upper().endswith('.UNI'):
|
if File.upper().startswith(FileName.upper()) and File.upper().endswith('.UNI'):
|
||||||
|
Reference in New Issue
Block a user