Show Date in index confirmation, add new hash logic to all paths, fix hash empty when using folder watch #GI-12
This commit is contained in:
@@ -168,26 +168,25 @@ Public Class frmStart
|
||||
Dim oLastPipe = oFiledropString.LastIndexOf("|")
|
||||
Dim oHandleType As String = oFiledropString.Substring(0, oLastPipe + 1)
|
||||
Dim oFilename As String = oFiledropString.Substring(oLastPipe + 1)
|
||||
Dim oFileExists As Boolean = ClassIndexFunctions.FileExistsinDropTable(oFilename)
|
||||
Dim oFileExists As Date = ClassIndexFunctions.FileExistsinDropTable(oFilename)
|
||||
|
||||
If oFileExists = False Then
|
||||
If IsNothing(oFileExists) Then
|
||||
ClassFilehandle.Decide_FileHandle(oFilename, oHandleType)
|
||||
oIndex += 1
|
||||
ElseIf oFileExists Then
|
||||
Else
|
||||
Dim oResult As DialogResult
|
||||
Dim oDate As String = oFileExists.ToString("d")
|
||||
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
oResult = MsgBox("Die Datei wurde bereits verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
|
||||
oResult = MsgBox($"Die Datei wurde bereits am [{oDate}] verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
Else
|
||||
oResult = MsgBox("This file has already been processed. Do you want to process the same file again?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
|
||||
oResult = MsgBox($"This file has already been processed at [{oDate}]. Do you want to process the same file again?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
End If
|
||||
|
||||
If oResult = DialogResult.Yes Then
|
||||
ClassFilehandle.Decide_FileHandle(oFilename, oHandleType)
|
||||
oIndex += 1
|
||||
End If
|
||||
Else
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -216,7 +215,7 @@ Public Class frmStart
|
||||
CURRENT_FILENAME = Filerow.Item("FILENAME2WORK")
|
||||
CURRENT_WORKFILE_GUID = Filerow.Item(0)
|
||||
CURRENT_WORKFILE = Filerow.Item("FILENAME2WORK")
|
||||
CURRENT_WORKFILE_HASH = Filerow.Item("FILE_HASH")
|
||||
CURRENT_WORKFILE_HASH = NotNull(Filerow.Item("FILE_HASH"), "")
|
||||
|
||||
LOGGER.Info(">> CURRENT_WORKFILE: " & CURRENT_WORKFILE)
|
||||
If File.Exists(CURRENT_WORKFILE) = True And DTACTUAL_FILES.Rows.Count > 0 Then
|
||||
@@ -356,29 +355,49 @@ Public Class frmStart
|
||||
LOGGER.Info(">> FWSCAN started - Checking file:" & CURRENT_SCAN_FOLDERWATCH)
|
||||
Dim fileEntries As String() = Directory.GetFiles(CURRENT_SCAN_FOLDERWATCH)
|
||||
' Process the list of files found in the directory.
|
||||
Dim fileName As String
|
||||
For Each fileName In fileEntries
|
||||
LOGGER.Info(">> Scanfolder after startup: Checking file:" & fileName)
|
||||
Dim oFileName As String
|
||||
For Each oFileName In fileEntries
|
||||
LOGGER.Info(">> Scanfolder after startup: Checking file:" & oFileName)
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If fileName.ToLower.Contains(content) Then
|
||||
If oFileName.ToLower.Contains(content) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
Dim handleType As String
|
||||
If fileName.ToLower.EndsWith(".msg") Then
|
||||
handleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
Dim oHandleType As String
|
||||
If oFileName.ToLower.EndsWith(".msg") Then
|
||||
oHandleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
Else
|
||||
handleType = "|FW_SIMPLEINDEXER|"
|
||||
oHandleType = "|FW_SIMPLEINDEXER|"
|
||||
End If
|
||||
'Die Datei übergeben
|
||||
LOGGER.Info(">> Adding file from Scanfolder after startup:" & fileName)
|
||||
If ClassIndexFunctions.FileExistsinDropTable(fileName) = False Then
|
||||
ClassFilehandle.Decide_FileHandle(fileName, handleType)
|
||||
LOGGER.Info(">> Adding file from Scanfolder after startup:" & oFileName)
|
||||
|
||||
Dim oFileExists As Date = ClassIndexFunctions.FileExistsinDropTable(oFileName)
|
||||
|
||||
If IsNothing(oFileExists) Then
|
||||
ClassFilehandle.Decide_FileHandle(oFileName, oHandleType)
|
||||
Else
|
||||
LOGGER.Info(">> Scanfolder Startup: File already exists:" & fileName)
|
||||
Dim oResult As DialogResult
|
||||
Dim oDate As String = oFileExists.ToString("d")
|
||||
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
oResult = MsgBox($"Die Datei wurde bereits am [{oDate}] verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
Else
|
||||
oResult = MsgBox($"This file has already been processed at [{oDate}]. Do you want to process the same file again?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
End If
|
||||
|
||||
If oResult = DialogResult.Yes Then
|
||||
ClassFilehandle.Decide_FileHandle(oFileName, oHandleType)
|
||||
End If
|
||||
End If
|
||||
Next fileName
|
||||
|
||||
'If ClassIndexFunctions.FileExistsinDropTable(fileName) = False Then
|
||||
' ClassFilehandle.Decide_FileHandle(fileName, handleType)
|
||||
'Else
|
||||
' LOGGER.Info(">> Scanfolder Startup: File already exists:" & fileName)
|
||||
'End If
|
||||
Next oFileName
|
||||
|
||||
Else
|
||||
LOGGER.Info(">> FWSCAN not started")
|
||||
@@ -393,29 +412,50 @@ Public Class frmStart
|
||||
LOGGER.Info(">> FW_started started - Checking file:" & CURRENT_FOLDERWATCH)
|
||||
Dim fileEntries As String() = Directory.GetFiles(CURRENT_FOLDERWATCH)
|
||||
' Process the list of files found in the directory.
|
||||
Dim fileName As String
|
||||
For Each fileName In fileEntries
|
||||
LOGGER.Info(">> Folderwach after startup: Checking file:" & fileName)
|
||||
Dim oFileName As String
|
||||
For Each oFileName In fileEntries
|
||||
LOGGER.Info(">> Folderwach after startup: Checking file:" & oFileName)
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If fileName.ToLower.Contains(content) Then
|
||||
If oFileName.ToLower.Contains(content) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
Dim handleType As String
|
||||
If fileName.ToLower.EndsWith(".msg") Then
|
||||
If oFileName.ToLower.EndsWith(".msg") Then
|
||||
handleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
Else
|
||||
handleType = "|FW_SIMPLEINDEXER|"
|
||||
End If
|
||||
'Die Datei übergeben
|
||||
LOGGER.Info(">> Adding file from Folderwatch after startup:" & fileName)
|
||||
If ClassIndexFunctions.FileExistsinDropTable(fileName) = False Then
|
||||
ClassFilehandle.Decide_FileHandle(fileName, handleType)
|
||||
LOGGER.Info(">> Adding file from Folderwatch after startup:" & oFileName)
|
||||
|
||||
'If ClassIndexFunctions.FileExistsinDropTable(fileName) = False Then
|
||||
' ClassFilehandle.Decide_FileHandle(fileName, handleType)
|
||||
'Else
|
||||
' LOGGER.Info(">> Folderwatch Startup: File already exists:" & fileName)
|
||||
'End If
|
||||
|
||||
Dim oFileExists As Date = ClassIndexFunctions.FileExistsinDropTable(oFileName)
|
||||
|
||||
If IsNothing(oFileExists) Then
|
||||
ClassFilehandle.Decide_FileHandle(oFileName, handleType)
|
||||
Else
|
||||
LOGGER.Info(">> Folderwatch Startup: File already exists:" & fileName)
|
||||
Dim oResult As DialogResult
|
||||
Dim oDate As String = oFileName.ToString("d")
|
||||
|
||||
If USER_LANGUAGE = "de-DE" Then
|
||||
oResult = MsgBox($"Die Datei wurde bereits am [{oDate}] verarbeitet. Wollen Sie die gleiche Datei noch einmal verarbeiten?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
Else
|
||||
oResult = MsgBox($"This file has already been processed at [{oDate}]. Do you want to process the same file again?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "GLOBIX - FolderWatch")
|
||||
End If
|
||||
|
||||
If oResult = DialogResult.Yes Then
|
||||
ClassFilehandle.Decide_FileHandle(oFileName, handleType)
|
||||
End If
|
||||
End If
|
||||
Next fileName
|
||||
|
||||
Next oFileName
|
||||
|
||||
Else
|
||||
LOGGER.Info(">> FW_started not started")
|
||||
@@ -512,9 +552,11 @@ Public Class frmStart
|
||||
Dim fileexists As Boolean = System.IO.File.Exists(FileForWork)
|
||||
If fileInUse = False Then
|
||||
If fileexists = True Then
|
||||
CURRENT_WORKFILE = FileForWork
|
||||
CURRENT_FILENAME = FileForWork
|
||||
CURRENT_WORKFILE = FileForWork
|
||||
CURRENT_WORKFILE_GUID = row.Item("GUID")
|
||||
CURRENT_WORKFILE_HASH = row.Item("FILE_HASH")
|
||||
|
||||
Open_IndexDialog()
|
||||
Else
|
||||
LOGGER.Info(">> File not existing - Row will be deleted!")
|
||||
|
||||
Reference in New Issue
Block a user