Filepath = os.path.normpath(Filepath)\r
SqlCommand = """\r
select Value1, FullPath from Inf, File where Inf.Model = %s and Inf.BelongsToFile in(\r
- select distinct B.BelongsToFile from File as A left join Inf as B \r
+ select distinct B.BelongsToFile from File as A left join Inf as B\r
where A.ID = B.BelongsToFile and B.Model = %s and (A.Path || '%s' || B.Value1) = '%s')\r
and Inf.BelongsToFile = File.ID""" \\r
% (MODEL_META_DATA_PACKAGE, MODEL_EFI_SOURCE_FILE, '\\', Filepath)\r
InfFullPath = os.path.normpath(os.path.join(WorkSpace, Record[1]))\r
(DecPath, DecName) = os.path.split(DecFullPath)\r
(InfPath, InfName) = os.path.split(InfFullPath)\r
- SqlCommand = """select Value1 from Dec where BelongsToFile = \r
+ SqlCommand = """select Value1 from Dec where BelongsToFile =\r
(select ID from File where FullPath = '%s') and Model = %s""" \\r
% (DecFullPath, MODEL_EFI_INCLUDE)\r
NewRecordSet = Db.TblDec.Exec(SqlCommand)\r
IncludePath = os.path.normpath(os.path.join(DecPath, NewRecord[0]))\r
if IncludePath not in IncludeList:\r
IncludeList.append(IncludePath)\r
- \r
+\r
return IncludeList\r
\r
+## Get the file list\r
+#\r
+# Search table file and find all specific type files\r
+#\r
+def GetFileList(FileModel, Db):\r
+ FileList = []\r
+ SqlCommand = """select FullPath from File where Model = %s""" % str(FileModel)\r
+ RecordSet = Db.TblFile.Exec(SqlCommand)\r
+ for Record in RecordSet:\r
+ FileList.append(Record[0])\r
+\r
+ return FileList\r
+\r
## Get the table list\r
#\r
# Search table file and find all small tables\r
for Record in RecordSet:\r
TableName = Table + str(Record[0])\r
TableList.append(TableName)\r
- \r
+\r
return TableList\r
\r