mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-28 04:51:45 +02:00
Reformat and apply Stylecop rules
This commit is contained in:
@@ -48,7 +48,6 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
throw new RadarrStartupException("Cannot create AppFolder, Access to the path {0} is denied", _appFolderInfo.AppDataFolder);
|
||||
}
|
||||
|
||||
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
SetPermissions();
|
||||
@@ -82,8 +81,15 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
|
||||
if (_startupContext.Args.ContainsKey(StartupContext.APPDATA))
|
||||
{
|
||||
if (_diskProvider.FileExists(_appFolderInfo.GetDatabase())) return;
|
||||
if (!_diskProvider.FileExists(oldDbFile)) return;
|
||||
if (_diskProvider.FileExists(_appFolderInfo.GetDatabase()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_diskProvider.FileExists(oldDbFile))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_diskProvider.MoveFile(oldDbFile, _appFolderInfo.GetDatabase());
|
||||
CleanupSqLiteRollbackFiles();
|
||||
@@ -91,7 +97,10 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
}
|
||||
|
||||
// Exit if a radarr.db already exists
|
||||
if (_diskProvider.FileExists(_appFolderInfo.GetDatabase())) return;
|
||||
if (_diskProvider.FileExists(_appFolderInfo.GetDatabase()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Rename the DB file
|
||||
if (_diskProvider.FileExists(oldDbFile))
|
||||
@@ -112,10 +121,12 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void InitializeMonoApplicationData()
|
||||
{
|
||||
if (OsInfo.IsWindows) return;
|
||||
if (OsInfo.IsWindows)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -125,7 +136,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
var configHome = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData, Environment.SpecialFolderOption.DoNotVerify);
|
||||
if (configHome.IsNullOrWhiteSpace() ||
|
||||
configHome == "/.config" ||
|
||||
configHome.EndsWith("/.config") && !_diskProvider.FolderExists(configHome.GetParentPath()) ||
|
||||
(configHome.EndsWith("/.config") && !_diskProvider.FolderExists(configHome.GetParentPath())) ||
|
||||
!_diskProvider.FolderExists(configHome))
|
||||
{
|
||||
// Tell mono/netcore to use appData/.config as ApplicationData folder.
|
||||
@@ -135,7 +146,7 @@ namespace NzbDrone.Common.EnvironmentInfo
|
||||
var dataHome = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.DoNotVerify);
|
||||
if (dataHome.IsNullOrWhiteSpace() ||
|
||||
dataHome == "/.local/share" ||
|
||||
dataHome.EndsWith("/.local/share") && !_diskProvider.FolderExists(dataHome.GetParentPath().GetParentPath()) ||
|
||||
(dataHome.EndsWith("/.local/share") && !_diskProvider.FolderExists(dataHome.GetParentPath().GetParentPath())) ||
|
||||
!_diskProvider.FolderExists(dataHome))
|
||||
{
|
||||
// Tell mono/netcore to use appData/.config/share as LocalApplicationData folder.
|
||||
|
Reference in New Issue
Block a user