1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-25 17:27:18 +00:00

minor linux fixes

This commit is contained in:
kay.one 2013-06-19 14:08:56 -07:00
parent f25df49068
commit 004335f0b0
2 changed files with 12 additions and 6 deletions

View file

@ -17,13 +17,19 @@ namespace NzbDrone.Common.EnvironmentInfo
{ {
private readonly IDiskProvider _diskProvider; private readonly IDiskProvider _diskProvider;
private readonly Logger _logger; private readonly Logger _logger;
private const Environment.SpecialFolder DATA_SPECIAL_FOLDER = Environment.SpecialFolder.CommonApplicationData; private readonly Environment.SpecialFolder DATA_SPECIAL_FOLDER = Environment.SpecialFolder.CommonApplicationData;
public AppFolderInfo(IDiskProvider diskProvider) public AppFolderInfo (IDiskProvider diskProvider)
{ {
_diskProvider = diskProvider; _diskProvider = diskProvider;
_logger = LogManager.GetCurrentClassLogger();
if (OsInfo.IsLinux)
{
DATA_SPECIAL_FOLDER = Environment.SpecialFolder.ApplicationData;
}
_logger = LogManager.GetCurrentClassLogger();
AppDataFolder = Path.Combine(Environment.GetFolderPath(DATA_SPECIAL_FOLDER, Environment.SpecialFolderOption.DoNotVerify), "NzbDrone"); AppDataFolder = Path.Combine(Environment.GetFolderPath(DATA_SPECIAL_FOLDER, Environment.SpecialFolderOption.DoNotVerify), "NzbDrone");
StartUpFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName; StartUpFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName;

View file

@ -36,7 +36,7 @@ namespace NzbDrone
public void Route(ApplicationModes applicationModes) public void Route(ApplicationModes applicationModes)
{ {
if (!_runtimeInfo.IsUserInteractive) if (!_runtimeInfo.IsUserInteractive && !OsInfo.IsLinux)
{ {
applicationModes = ApplicationModes.Service; applicationModes = ApplicationModes.Service;
} }