Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -17,6 +17,7 @@ PaserValidate
|
||||
|
||||
import os.path
|
||||
import re
|
||||
import platform
|
||||
|
||||
from Library.DataType import MODULE_LIST
|
||||
from Library.DataType import COMPONENT_TYPE_LIST
|
||||
@ -281,9 +282,14 @@ def IsValidPath(Path, Root):
|
||||
# @param Path: path to be checked
|
||||
#
|
||||
def IsValidInstallPath(Path):
|
||||
if os.path.isabs(Path):
|
||||
return False
|
||||
|
||||
if platform.platform().find("Windows") >= 0:
|
||||
if os.path.isabs(Path):
|
||||
return False
|
||||
else:
|
||||
if Path[1:2] == ':' or Path.find('\\') >=0:
|
||||
return False
|
||||
if os.path.isabs(Path):
|
||||
return False
|
||||
if Path.startswith('.'):
|
||||
return False
|
||||
|
||||
|
Reference in New Issue
Block a user