From a0b4d3a38d49f02ae638e62e3c8b5fdfc6799edd Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Tue, 20 Sep 2016 21:30:46 +0200 Subject: [PATCH] Removed conflicting criteria from IsProduction check. --- .../EnvironmentInfo/RuntimeInfoBase.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs index 04be4e8f0..aaff1eec0 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfoBase.cs @@ -22,13 +22,13 @@ namespace NzbDrone.Common.EnvironmentInfo serviceProvider.ServiceExist(ServiceProvider.NZBDRONE_SERVICE_NAME) && serviceProvider.GetStatus(ServiceProvider.NZBDRONE_SERVICE_NAME) == ServiceControllerStatus.StartPending; - //Guarded to avoid issues when running in a non-managed process + //Guarded to avoid issues when running in a non-managed process var entry = Assembly.GetEntryAssembly(); if (entry != null) { ExecutingApplication = entry.Location; - } + } } static RuntimeInfoBase() @@ -69,7 +69,7 @@ namespace NzbDrone.Common.EnvironmentInfo public bool IsWindowsService { get; private set; } public bool IsConsole - { + { get { if (OsInfo.IsWindows) @@ -78,7 +78,7 @@ namespace NzbDrone.Common.EnvironmentInfo } return true; - } + } } public bool IsRunning { get; set; } @@ -105,7 +105,7 @@ namespace NzbDrone.Common.EnvironmentInfo } catch { - + } try @@ -115,15 +115,14 @@ namespace NzbDrone.Common.EnvironmentInfo } catch { - + } string lowerCurrentDir = Directory.GetCurrentDirectory().ToLower(); if (lowerCurrentDir.Contains("teamcity")) return false; if (lowerCurrentDir.Contains("_output")) return false; - if (lowerCurrentDir.StartsWith("/run/")) return false; return true; } } -} \ No newline at end of file +}