MS Doppeltprüfung
This commit is contained in:
@@ -794,6 +794,7 @@ Public Class frmFlowForm
|
||||
FileHandle.Decide_FileHandle(fileName, handleType)
|
||||
Else
|
||||
IO.File.Delete(fileName)
|
||||
|
||||
Logger.Info("Scanfolder Startup: File already exists:" & fileName)
|
||||
End If
|
||||
Next fileName
|
||||
@@ -831,6 +832,7 @@ Public Class frmFlowForm
|
||||
FileHandle.Decide_FileHandle(fileName, handleType)
|
||||
Else
|
||||
Logger.Info("Folderwatch Startup: File already exists:" & fileName)
|
||||
IO.File.Delete(fileName)
|
||||
End If
|
||||
Next fileName
|
||||
|
||||
@@ -875,6 +877,7 @@ Public Class frmFlowForm
|
||||
Me.TimerFolderwatch.Stop()
|
||||
For Each row As DataRow In My.Application.Globix.DTACTUAL_FILES.Rows
|
||||
Dim FILEGUID = row.Item("GUID")
|
||||
Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
|
||||
If My.Application.Globix.ABORT_INDEXING = True Then
|
||||
Exit For
|
||||
End If
|
||||
@@ -886,16 +889,31 @@ Public Class frmFlowForm
|
||||
Dim fileexists As Boolean = System.IO.File.Exists(FileForWork)
|
||||
If fileInUse = False Then
|
||||
If fileexists = True Then
|
||||
My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile With {
|
||||
Dim handleType As String
|
||||
If FileForWork.ToLower.EndsWith(".msg") Then
|
||||
handleType = "|FW_OUTLOOK_MESSAGE|"
|
||||
Else
|
||||
handleType = "|FW_SIMPLEINDEXER|"
|
||||
End If
|
||||
If FileHandle.CheckDuplicateFiles(FileForWork, "FolderWatch") Then
|
||||
My.Application.Globix.CurrentWorkfile = New Globix.Models.WorkFile With {
|
||||
.Id = DirectCast(row.Item("GUID"), Integer),
|
||||
.FilePath = FileForWork,
|
||||
.HotfolderFile = True
|
||||
}
|
||||
Globix_Open_IndexDialog()
|
||||
Else
|
||||
My.Database.ExecuteNonQueryECM(oDel)
|
||||
IO.File.Delete(FileForWork)
|
||||
Logger.Info("Folderwatch: File has been deleted:" & FileForWork)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Globix_Open_IndexDialog()
|
||||
Else
|
||||
Logger.Info(" File not existing - Row will be deleted!")
|
||||
Dim oDel = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
|
||||
|
||||
My.Database.ExecuteNonQueryECM(oDel)
|
||||
End If
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user