mirror of
https://github.com/Sonarr/Sonarr
synced 2025-02-25 07:23:16 +00:00
Fixed: Throw SonarrStartupException if can't access AppFolder Location
This commit is contained in:
parent
bf1fbd7fc4
commit
6c09b7dc28
1 changed files with 10 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
using NLog;
|
||||
|
@ -28,7 +28,15 @@ namespace NzbDrone.Common.EnvironmentInfo
|
|||
|
||||
public void Register()
|
||||
{
|
||||
_diskProvider.EnsureFolder(_appFolderInfo.AppDataFolder);
|
||||
try
|
||||
{
|
||||
_diskProvider.EnsureFolder(_appFolderInfo.AppDataFolder);
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
throw new SonarrStartupException("Cannot create AppFolder, Access to the path {0} is denied", _appFolderInfo.AppDataFolder);
|
||||
}
|
||||
|
||||
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue