summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/Misc.py
diff options
context:
space:
mode:
authorYingke Liu <yingke.d.liu@intel.com>2014-09-16 08:33:40 +0000
committeryingke <yingke@6f19259b-4bc3-4df7-8a09-765794883524>2014-09-16 08:33:40 +0000
commit9b9500a1c9e620c9aac565679e2eb77255ba3306 (patch)
treef3504990038d8bc43ab31fce2462852916165011 /BaseTools/Source/Python/Common/Misc.py
parent122d9317cf4ebc474586fcd726b59f15b7b3feb0 (diff)
downloadedk2-9b9500a1c9e620c9aac565679e2eb77255ba3306.tar.gz
edk2-9b9500a1c9e620c9aac565679e2eb77255ba3306.tar.bz2
edk2-9b9500a1c9e620c9aac565679e2eb77255ba3306.zip
Support DSC and FDF file out of WORKSPACE by GenFds.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16113 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Common/Misc.py')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 01297cd0a9..19a1319639 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -526,6 +526,7 @@ def RealPath(File, Dir='', OverrideDir=''):
return NewFile
def RealPath2(File, Dir='', OverrideDir=''):
+ NewFile = None
if OverrideDir:
NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(OverrideDir, File))]
if NewFile:
@@ -535,8 +536,10 @@ def RealPath2(File, Dir='', OverrideDir=''):
return NewFile[len(OverrideDir)+1:], NewFile[0:len(OverrideDir)]
if GlobalData.gAllFiles:
NewFile = GlobalData.gAllFiles[os.path.normpath(os.path.join(Dir, File))]
- else:
+ if not NewFile:
NewFile = os.path.normpath(os.path.join(Dir, File))
+ if not os.path.exists(NewFile):
+ return None, None
if NewFile:
if Dir:
if Dir[-1] == os.path.sep: