]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Ecc/Check.py
BaseTools/Ecc: Fix an issue of path separator compatibility
[mirror_edk2.git] / BaseTools / Source / Python / Ecc / Check.py
index 0fdc7e35c18a17671d251e4bf55c0db5b02cff65..6087abfa4d8d61756270cc8cd52e7456d6a7e73b 100644 (file)
@@ -1103,11 +1103,11 @@ class Check(object):
                     InfPathList.append(Item[0])\r
             SqlCommand = """\r
                          select ID, Path, FullPath from File where upper(FullPath) not in\r
-                            (select upper(A.Path) || '\\' || upper(B.Value1) from File as A, INF as B\r
+                            (select upper(A.Path) || '%s' || upper(B.Value1) from File as A, INF as B\r
                             where A.ID in (select BelongsToFile from INF where Model = %s group by BelongsToFile) and\r
                             B.BelongsToFile = A.ID and B.Model = %s)\r
                             and (Model = %s or Model = %s)\r
-                        """ % (MODEL_EFI_SOURCE_FILE, MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H)\r
+                        """ % (os.sep, MODEL_EFI_SOURCE_FILE, MODEL_EFI_SOURCE_FILE, MODEL_FILE_C, MODEL_FILE_H)\r
             RecordSet = EccGlobalData.gDb.TblInf.Exec(SqlCommand)\r
             for Record in RecordSet:\r
                 Path = Record[1]\r
@@ -1132,9 +1132,9 @@ class Check(object):
                 BelongsToFile = Pcd[4]\r
                 SqlCommand = """\r
                              select ID from File where FullPath in\r
-                            (select B.Path || '\\' || A.Value1 from INF as A, File as B where A.Model = %s and A.BelongsToFile = %s\r
+                            (select B.Path || '%s' || A.Value1 from INF as A, File as B where A.Model = %s and A.BelongsToFile = %s\r
                              and B.ID = %s and (B.Model = %s or B.Model = %s))\r
-                             """ % (MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H)\r
+                             """ % (os.sep, MODEL_EFI_SOURCE_FILE, BelongsToFile, BelongsToFile, MODEL_FILE_C, MODEL_FILE_H)\r
                 TableSet = EccGlobalData.gDb.TblFile.Exec(SqlCommand)\r
                 for Tbl in TableSet:\r
                     TblName = 'Identifier' + str(Tbl[0])\r