Datenserver, faktmail, a

This commit is contained in:
2026-09-10 11:53:56 +02:00
parent 1a726d351e
commit c717b3278a
5 changed files with 271 additions and 23 deletions

View File

@@ -2428,17 +2428,27 @@ Public Class DATENVERVER_OPTIONS
kdnr_path = kdnr
End If
If kategorie <> "" Then
Dim dir = ""
dir &= rootDir
dir &= kategorie & "\"
dir &= If(ordner IsNot Nothing AndAlso ordner <> "", ordner & "\", "")
dir &= If(kdnr_path <> "", kdnr_path & "\", "")
dir &= If(da_uOrdner1 IsNot Nothing AndAlso da_uOrdner1 <> "", da_uOrdner1 & "\", "")
dir &= If(da_uOrdner2 IsNot Nothing AndAlso da_uOrdner2 <> "", da_uOrdner2 & "\", "")
dir &= If(da_uOrdner3 IsNot Nothing AndAlso da_uOrdner3 <> "", da_uOrdner3 & "\", "")
Dim dir As String = Path.Combine(
rootDir,
kategorie,
If(String.IsNullOrWhiteSpace(ordner), "", ordner),
If(String.IsNullOrWhiteSpace(kdnr_path), "", kdnr_path),
If(String.IsNullOrWhiteSpace(da_uOrdner1), "", da_uOrdner1),
If(String.IsNullOrWhiteSpace(da_uOrdner2), "", da_uOrdner2),
If(String.IsNullOrWhiteSpace(da_uOrdner3), "", da_uOrdner3))
If Not onlyordner Then
If Not System.IO.Directory.Exists(dir) Then
System.IO.Directory.CreateDirectory(dir)
Try
If Not Directory.Exists(dir) Then
Directory.CreateDirectory(dir)
End If
Catch ex As UnauthorizedAccessException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, "Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & "Keine Berechtigung für den Ordner: " & dir & Environment.NewLine & "Windows-Benutzer: " & System.Security.Principal.WindowsIdentity.GetCurrent().Name & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Catch ex As IOException
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, "Fehler beim Zugriff auf den Ordner: " & dir & vbNewLine & vbNewLine & ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End If
Dim zusatz = "" : Dim zusatzcnt = 1
While System.IO.File.Exists(dir & dateiName & zusatz & If(bezeichnung.ToString.EndsWith(endung), "", endung))