Bugfixes 2.4.0.9

This commit is contained in:
Jonathan Jenne
2021-07-07 15:40:44 +02:00
parent b32fd431be
commit 03ab1f00c5
9 changed files with 171 additions and 124 deletions

View File

@@ -10,7 +10,7 @@ Public Class ClassIndexFunctions
pFilename = pFilename.Replace("'", "''")
End If
If pFilename.ToUpper.EndsWith(".MSG") And pHandleType = "|OUTLOOK_MESSAGE|" Then
If pFilename.ToUpper.EndsWith(".MSG") And (pHandleType = "|OUTLOOK_MESSAGE|" Or pHandleType = "|MSGONLY|") Then
' MSG Files cannot be hashed based on filecontents, so we use the filename instead
oHash = FILESYSTEM.GetChecksumFromString(pFilename)
Else
@@ -24,31 +24,31 @@ Public Class ClassIndexFunctions
Return Nothing
End If
oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN"
Dim oResult As DataTable = ClassDatabase.Return_Datatable_CS(oSQL, MyConnectionString, True)
'oSQL = "SELECT * FROM TBGI_FILES_USER WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') AND WORKED = 0 ORDER BY ADDED_WHEN"
'Dim oResult As DataTable = ClassDatabase.Return_Datatable_CS(oSQL, MyConnectionString, True)
'If oResult Is Nothing Then
'Return Nothing
'End If
'If oResult.Rows.Count = 0 Then
oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN"
Dim oResult = ClassDatabase.Return_Datatable_CS(oSQL, MyConnectionString, True)
If oResult Is Nothing Then
Return Nothing
End If
If oResult.Rows.Count = 0 Then
oSQL = "SELECT * FROM TBGI_HISTORY WHERE UPPER(FILE_HASH) = UPPER('" & oHash & "') ORDER BY ADDED_WHEN"
oResult = ClassDatabase.Return_Datatable_CS(oSQL, MyConnectionString, True)
If oResult Is Nothing Then
Return Nothing
End If
If oResult.Rows.Count = 0 Then
Return Nothing
Else
Dim oFirstRow As DataRow = oResult.Rows.Item(0)
Return oFirstRow.Item("ADDED_WHEN")
End If
Return Nothing
Else
Dim oFirstRow As DataRow = oResult.Rows.Item(0)
Return oFirstRow.Item("ADDED_WHEN")
End If
'Else
'Dim oFirstRow As DataRow = oResult.Rows.Item(0)
'Return oFirstRow.Item("ADDED_WHEN")
'End If
Catch ex As Exception
MsgBox("Error in FileExistsinDropTable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & oSQL, MsgBoxStyle.Critical)
Return Nothing