MS1
This commit is contained in:
parent
2041f952ff
commit
042f24e231
@ -175,4 +175,17 @@ Public Class ClassFilehandle
|
||||
End Try
|
||||
|
||||
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
|
||||
|
||||
@ -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:")
|
||||
End Select
|
||||
Next
|
||||
CURRENT_NEWFILENAME = ClassFilehandle.CleanFilename(CURRENT_NEWFILENAME, "")
|
||||
CURRENT_NEWFILENAME = NewFileString & extension
|
||||
|
||||
Dim path = System.IO.Path.GetDirectoryName(CURRENT_NEWFILENAME)
|
||||
If folder_Created = False Then
|
||||
' Den Zielordner erstellen
|
||||
|
||||
@ -616,6 +616,7 @@ Public Class frmStart
|
||||
' Dim fil As String
|
||||
Me.TimerFolderWatch.Stop()
|
||||
For Each row As DataRow In DTACTUAL_FILES.Rows
|
||||
Dim FILEGUID = row.Item("GUID")
|
||||
If ABORT_INDEXING = True Then
|
||||
Exit For
|
||||
End If
|
||||
@ -630,7 +631,9 @@ Public Class frmStart
|
||||
CURRENT_WORKFILE_GUID = row.Item("GUID")
|
||||
Open_IndexDialog()
|
||||
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
|
||||
Else
|
||||
ClassLogger.Add(">> file '" & row.Item(1) & "' could not be opened exclusively - fileInUse!", False)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user