diff options
author | Bob Feng <bob.c.feng@intel.com> | 2020-09-01 18:23:15 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-09-01 17:55:56 +0000 |
commit | 7513559926355dcd20516d01b0b44f2cddc2ff08 (patch) | |
tree | 156e213f5934d2bf1cda5453fd9b67879d3ed6ee /BaseTools/Source | |
parent | 46db105b7b77bc478452887e25836cd0745e9b65 (diff) | |
download | edk2-7513559926355dcd20516d01b0b44f2cddc2ff08.zip edk2-7513559926355dcd20516d01b0b44f2cddc2ff08.tar.gz edk2-7513559926355dcd20516d01b0b44f2cddc2ff08.tar.bz2 |
BaseTools/Ecc: Fix an issue of path separator compatibility
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2904
The path separator is different in Windows and Linux, the
original code does not handle this difference. This patch
is to fix this issue.
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Shenglei Zhang <shenglei.zhang@intel.com>
Message-Id: <20200901102315.38840-1-bob.c.feng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r-- | BaseTools/Source/Python/Ecc/Check.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BaseTools/Source/Python/Ecc/Check.py b/BaseTools/Source/Python/Ecc/Check.py index 0fdc7e3..6087abf 100644 --- a/BaseTools/Source/Python/Ecc/Check.py +++ b/BaseTools/Source/Python/Ecc/Check.py @@ -1103,11 +1103,11 @@ class Check(object): InfPathList.append(Item[0])
SqlCommand = """
select ID, Path, FullPath from File where upper(FullPath) not in
- (select upper(A.Path) || '\\' || upper(B.Value1) from File as A, INF as B
+ (select upper(A.Path) || '%s' || upper(B.Value1) from File as A, INF as B
where A.ID in (select BelongsToFile from INF where Model = %s group by BelongsToFile) and
B.BelongsToFile = A.ID and B.Model = %s)
and (Model = %s or Model = %s)
- """ % (MODEL_EFI_SOURCE_FILE, MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H)
+ """ % (os.sep, MODEL_EFI_SOURCE_FILE, MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H)
RecordSet = EccGlobalData.gDb.TblInf.Exec(SqlCommand)
for Record in RecordSet:
Path = Record[1]
@@ -1132,9 +1132,9 @@ class Check(object): BelongsToFile = Pcd[4]
SqlCommand = """
select ID from File where FullPath in
- (select B.Path || '\\' || A.Value1 from INF as A, File as B where A.Model = %s and A.BelongsToFile = %s
+ (select B.Path || '%s' || A.Value1 from INF as A, File as B where A.Model = %s and A.BelongsToFile = %s
and B.ID = %s and (B.Model = %s or B.Model = %s))
- """ % (MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H)
+ """ % (os.sep, MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H)
TableSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)
for Tbl in TableSet:
TblName = 'Identifier' + str(Tbl[0])
|