From 5ecc4a2333b4467f9ed40430fc1d8b4afe4c4b02 Mon Sep 17 00:00:00 2001 From: ta264 Date: Sat, 15 Feb 2020 07:53:51 +0000 Subject: [PATCH] Fixed: Don't check update folder writable in docker --- src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs index 6b6d92d1f..da6800bea 100644 --- a/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs +++ b/src/NzbDrone.Core/HealthCheck/Checks/UpdateCheck.cs @@ -16,16 +16,19 @@ namespace NzbDrone.Core.HealthCheck.Checks private readonly IAppFolderInfo _appFolderInfo; private readonly ICheckUpdateService _checkUpdateService; private readonly IConfigFileProvider _configFileProvider; + private readonly IOsInfo _osInfo; public UpdateCheck(IDiskProvider diskProvider, IAppFolderInfo appFolderInfo, ICheckUpdateService checkUpdateService, - IConfigFileProvider configFileProvider) + IConfigFileProvider configFileProvider, + IOsInfo osInfo) { _diskProvider = diskProvider; _appFolderInfo = appFolderInfo; _checkUpdateService = checkUpdateService; _configFileProvider = configFileProvider; + _osInfo = osInfo; } public override HealthCheck Check() @@ -34,7 +37,8 @@ namespace NzbDrone.Core.HealthCheck.Checks var uiFolder = Path.Combine(startupFolder, "UI"); if ((OsInfo.IsWindows || _configFileProvider.UpdateAutomatically) && - _configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn) + _configFileProvider.UpdateMechanism == UpdateMechanism.BuiltIn && + !_osInfo.IsDocker) { if (OsInfo.IsOsx && startupFolder.GetAncestorFolders().Contains("AppTranslocation")) {