From 004335f0b0c1f0033aae52083e0d099f005741d5 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Wed, 19 Jun 2013 14:08:56 -0700 Subject: [PATCH] minor linux fixes --- NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs | 16 +++++++++++----- NzbDrone/Router.cs | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs b/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs index 5e66a5350..5f441befc 100644 --- a/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs +++ b/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs @@ -17,13 +17,19 @@ namespace NzbDrone.Common.EnvironmentInfo { private readonly IDiskProvider _diskProvider; 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) - { - _diskProvider = diskProvider; - _logger = LogManager.GetCurrentClassLogger(); + public AppFolderInfo (IDiskProvider diskProvider) + { + _diskProvider = diskProvider; + + if (OsInfo.IsLinux) + { + DATA_SPECIAL_FOLDER = Environment.SpecialFolder.ApplicationData; + } + + _logger = LogManager.GetCurrentClassLogger(); AppDataFolder = Path.Combine(Environment.GetFolderPath(DATA_SPECIAL_FOLDER, Environment.SpecialFolderOption.DoNotVerify), "NzbDrone"); StartUpFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName; diff --git a/NzbDrone/Router.cs b/NzbDrone/Router.cs index ffede0c83..33689d1ed 100644 --- a/NzbDrone/Router.cs +++ b/NzbDrone/Router.cs @@ -36,7 +36,7 @@ namespace NzbDrone public void Route(ApplicationModes applicationModes) { - if (!_runtimeInfo.IsUserInteractive) + if (!_runtimeInfo.IsUserInteractive && !OsInfo.IsLinux) { applicationModes = ApplicationModes.Service; }