From f4e27002f9cb7462ea5eb0bb60a6ba1803e0f6f1 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Thu, 25 Jul 2013 23:55:15 -0700 Subject: [PATCH] don't set data permission in linux. --- NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs b/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs index 156d257c1..5e66a5350 100644 --- a/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs +++ b/NzbDrone.Common/EnvironmentInfo/AppFolderInfo.cs @@ -17,7 +17,7 @@ namespace NzbDrone.Common.EnvironmentInfo { private readonly IDiskProvider _diskProvider; private readonly Logger _logger; - private readonly Environment.SpecialFolder _dataSpecialFolder = Environment.SpecialFolder.CommonApplicationData; + private const Environment.SpecialFolder DATA_SPECIAL_FOLDER = Environment.SpecialFolder.CommonApplicationData; public AppFolderInfo(IDiskProvider diskProvider) @@ -25,16 +25,14 @@ namespace NzbDrone.Common.EnvironmentInfo _diskProvider = diskProvider; _logger = LogManager.GetCurrentClassLogger(); - if (OsInfo.IsLinux) - { - _dataSpecialFolder = Environment.SpecialFolder.ApplicationData; - } - - AppDataFolder = Path.Combine(Environment.GetFolderPath(_dataSpecialFolder, Environment.SpecialFolderOption.DoNotVerify), "NzbDrone"); + AppDataFolder = Path.Combine(Environment.GetFolderPath(DATA_SPECIAL_FOLDER, Environment.SpecialFolderOption.DoNotVerify), "NzbDrone"); StartUpFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory.FullName; TempFolder = Path.GetTempPath(); - SetPermissions(); + if (!OsInfo.IsLinux) + { + SetPermissions(); + } } private void SetPermissions()