diff options
Diffstat (limited to 'BaseTools/Source/Python/Common/Misc.py')
-rw-r--r-- | BaseTools/Source/Python/Common/Misc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 50504aa73c..8b5598b5f0 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -445,8 +445,10 @@ def RealPath2(File, Dir='', OverrideDir=''): return NewFile[len(OverrideDir):], NewFile[0:len(OverrideDir)] else: return NewFile[len(OverrideDir)+1:], NewFile[0:len(OverrideDir)] - - NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(Dir, File))] + if GlobalData.gAllFiles: + NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(Dir, File))] + else: + NewFile = os.path.normpath(os.path.join(Dir, File)) if NewFile: if Dir: if Dir[-1] == os.path.sep: |