MS1
This commit is contained in:
parent
2041f952ff
commit
042f24e231
@ -175,4 +175,17 @@ Public Class ClassFilehandle
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
'' <summary>
|
||||||
|
''' Ersetzt alle nicht zulässigen Zeichen im angegebenen Dateinamen
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="sFilename">Dateiname ohne Pfadangabe</param>
|
||||||
|
''' <param name="sChar">Ersatzzeichen für alle unzulässigen Zeichen
|
||||||
|
''' im Dateinamen</param>
|
||||||
|
Public Shared Function CleanFilename(ByVal sFilename As String, _
|
||||||
|
Optional ByVal REPLACEChar As String = "") As String
|
||||||
|
|
||||||
|
' alle nicht zulässigen Zeichen ersetzen
|
||||||
|
Return System.Text.RegularExpressions.Regex.Replace( _
|
||||||
|
sFilename, "[?*^""<>|]", REPLACEChar)
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@ -1063,7 +1063,9 @@ Public Class frmIndex
|
|||||||
MsgBox("Achtung - in der Namenkonvention wurde ein Element gefunden welches nicht zugeordnet werden kann!" & vbNewLine & "Elementname: " & element.Value.ToUpper, MsgBoxStyle.Exclamation, "Unexpected error in Name generieren:")
|
MsgBox("Achtung - in der Namenkonvention wurde ein Element gefunden welches nicht zugeordnet werden kann!" & vbNewLine & "Elementname: " & element.Value.ToUpper, MsgBoxStyle.Exclamation, "Unexpected error in Name generieren:")
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
|
CURRENT_NEWFILENAME = ClassFilehandle.CleanFilename(CURRENT_NEWFILENAME, "")
|
||||||
CURRENT_NEWFILENAME = NewFileString & extension
|
CURRENT_NEWFILENAME = NewFileString & extension
|
||||||
|
|
||||||
Dim path = System.IO.Path.GetDirectoryName(CURRENT_NEWFILENAME)
|
Dim path = System.IO.Path.GetDirectoryName(CURRENT_NEWFILENAME)
|
||||||
If folder_Created = False Then
|
If folder_Created = False Then
|
||||||
' Den Zielordner erstellen
|
' Den Zielordner erstellen
|
||||||
|
|||||||
@ -616,6 +616,7 @@ Public Class frmStart
|
|||||||
' Dim fil As String
|
' Dim fil As String
|
||||||
Me.TimerFolderWatch.Stop()
|
Me.TimerFolderWatch.Stop()
|
||||||
For Each row As DataRow In DTACTUAL_FILES.Rows
|
For Each row As DataRow In DTACTUAL_FILES.Rows
|
||||||
|
Dim FILEGUID = row.Item("GUID")
|
||||||
If ABORT_INDEXING = True Then
|
If ABORT_INDEXING = True Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@ -630,7 +631,9 @@ Public Class frmStart
|
|||||||
CURRENT_WORKFILE_GUID = row.Item("GUID")
|
CURRENT_WORKFILE_GUID = row.Item("GUID")
|
||||||
Open_IndexDialog()
|
Open_IndexDialog()
|
||||||
Else
|
Else
|
||||||
ClassLogger.Add(">> file not existing - filexists!", False)
|
ClassLogger.Add(">> File not existing - Row will be deleted!", False)
|
||||||
|
Dim del = String.Format("DELETE FROM TBGI_FILES_USER WHERE GUID = {0}", FILEGUID)
|
||||||
|
ClassDatabase.Execute_non_Query(del)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
ClassLogger.Add(">> file '" & row.Item(1) & "' could not be opened exclusively - fileInUse!", False)
|
ClassLogger.Add(">> file '" & row.Item(1) & "' could not be opened exclusively - fileInUse!", False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user