Skip indexing of empty mail properties

This commit is contained in:
Jonathan Jenne 2022-02-01 15:41:26 +01:00
parent 03c8d5267e
commit 9b8a780f06

View File

@ -905,6 +905,8 @@ Public Class frmIndex
Dim oMail As IMail = EMAIL.Load_Email(oMsgFilePath)
Dim oMessageId As String = oMail.MessageID
LOGGER.Debug("MessageId: [{0}]", oMessageId)
Dim oMessageFrom As String = EMAIL.Get_MessageSender(oMail)
Dim oMessageTo As String = EMAIL.Get_MessageReceiver(oMail)
Dim oDateIn As Date = EMAIL.Get_MessageDate(oMail)
@ -935,17 +937,16 @@ Public Class frmIndex
Try
If oIndex.Value Is Nothing Then
LOGGER.Warn("Value for Index [{0}] was empty. Skipping.", oIndex.Key)
Return False
Continue For
End If
If TypeOf oIndex.Value Is String AndAlso oIndex.Value = String.Empty Then
LOGGER.Warn("Value for Index [{0}] was empty. Skipping.", oIndex.Key)
Return False
Continue For
End If
Dim oIndexingSuccessful = WriteIndex2File(oRow.Item(oIndex.Key), oIndex.Value)
If oIndexingSuccessful = False Then