diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb index 9faa6422..45c17238 100644 --- a/Modules.Logging/LogConfig.vb +++ b/Modules.Logging/LogConfig.vb @@ -173,7 +173,6 @@ Public Class LogConfig basePath = Path.Combine(appDataDir, companyName, productName, FOLDER_NAME_LOG) ElseIf logPath = PathType.CurrentDirectory Then Dim currentDirectory As String = My.Application.Info.DirectoryPath - basePath = Path.Combine(currentDirectory, FOLDER_NAME_LOG) Else 'Custom Path basePath = customLogPath @@ -197,7 +196,7 @@ Public Class LogConfig End Using File.Delete(fileAccessPath) - Catch ex As UnauthorizedAccessException + Catch ex As Exception ' If creation fails, use failSafe path basePath = failSafePath End Try diff --git a/Modules.Logging/My Project/AssemblyInfo.vb b/Modules.Logging/My Project/AssemblyInfo.vb index 8dccce0d..f90d3a43 100644 --- a/Modules.Logging/My Project/AssemblyInfo.vb +++ b/Modules.Logging/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - +