From 03360ca43ff6bed0092faadc1bfc160733210525 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 8 Apr 2018 00:02:55 -0400 Subject: [PATCH] Fixed: Throw LidarrStartupException if can't access AppFolder Location --- .../EnvironmentInfo/AppFolderFactory.cs | 10 +++++++++- src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs index 0b13dadc4..43f90b72f 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/AppFolderFactory.cs @@ -31,7 +31,15 @@ namespace NzbDrone.Common.EnvironmentInfo public void Register() { - _diskProvider.EnsureFolder(_appFolderInfo.AppDataFolder); + try + { + _diskProvider.EnsureFolder(_appFolderInfo.AppDataFolder); + } + catch (UnauthorizedAccessException) + { + throw new LidarrStartupException("Cannot create AppFolder, Access to the path {0} is denied", _appFolderInfo.AppDataFolder); + } + if (OsInfo.IsWindows) { diff --git a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs index 5fd0e2d11..bd092c301 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -93,14 +93,14 @@ namespace NzbDrone.Common.Instrumentation if (updateClient) { dsn = RuntimeInfo.IsProduction - ? "https://bbb13f4547294da1bcd52069420aaa5d:950541e562cf43c594fe2dcfaf4c3271@sentry.io/209545" + ? "https://40210a1318dd4182840c17230a1bef36:2432a6c304964372ac878179c6511811@sentry.io/209545" : "https://edab7530cf9544dba1f86ac28aa0110b:b84a1425fc304f0188ef968576fe9690@sentry.io/227247"; } else { dsn = RuntimeInfo.IsProduction - ? "https://bbb13f4547294da1bcd52069420aaa5d:950541e562cf43c594fe2dcfaf4c3271@sentry.io/209545" + ? "https://40210a1318dd4182840c17230a1bef36:2432a6c304964372ac878179c6511811@sentry.io/209545" : "https://edab7530cf9544dba1f86ac28aa0110b:b84a1425fc304f0188ef968576fe9690@sentry.io/227247"; }