don't set data permission in linux.

This commit is contained in:
kay.one 2013-07-25 23:55:15 -07:00
parent 59f8e3046e
commit f4e27002f9
1 changed files with 6 additions and 8 deletions

View File

@ -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()