Sync basetools' source and binary files with r1707 of the basetools project.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff
2009-09-11 03:14:43 +00:00
parent f22911b49e
commit fd171542e0
91 changed files with 1794 additions and 974 deletions

View File

@ -418,6 +418,14 @@ def RealPath(File, Dir='', OverrideDir=''):
return NewFile
def RealPath2(File, Dir='', OverrideDir=''):
if OverrideDir:
NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(OverrideDir, File))]
if NewFile:
if OverrideDir[-1] == os.path.sep:
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 NewFile:
if Dir:
@ -428,10 +436,6 @@ def RealPath2(File, Dir='', OverrideDir=''):
else:
return NewFile, ''
if OverrideDir:
NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(OverrideDir, File))]
if NewFile:
return NewFile[len(OverrideDir)+1:], NewFile[0:len(OverrideDir)]
return None, None
## Check if gvien file exists or not