Dont execute folderwatch functions when indexing is active

This commit is contained in:
Jonathan Jenne
2020-02-11 15:55:55 +01:00
parent ad43903875
commit 1fbfa0b1ee
3 changed files with 14 additions and 0 deletions

View File

@@ -1250,6 +1250,8 @@ Public Class frmIndex
End Sub
Private Sub frmIndex_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Try
INDEXING_ACTIVE = False
' This prevents the thread issue when the form containing the viewer is opened via ShowDialog.
DocumentViewer1.Done()
@@ -1265,6 +1267,8 @@ Public Class frmIndex
' Abbruchzähler zurücksetzen
CancelAttempts = 0
INDEXING_ACTIVE = True
Try
CURRENT_ISATTACHMENT = False
DropType = ClassDatabase.Execute_Scalar("SELECT HANDLE_TYPE FROM TBGI_FILES_USER WHERE GUID = " & CURRENT_WORKFILE_GUID, MyConnectionString, True)