From d8d5dd487326dd3fccf4e9f30cd8f7e3783fcfda Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 12 Jan 2015 22:46:44 -0500 Subject: make channel access opt-in rather than opt out --- .../Updates/InstallationManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Common.Implementations/Updates') diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs index 47215aacf..264e63b47 100644 --- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs @@ -1,6 +1,7 @@ using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Events; using MediaBrowser.Common.Implementations.Security; +using MediaBrowser.Common.IO; using MediaBrowser.Common.Net; using MediaBrowser.Common.Plugins; using MediaBrowser.Common.Progress; @@ -106,6 +107,7 @@ namespace MediaBrowser.Common.Implementations.Updates private readonly IJsonSerializer _jsonSerializer; private readonly ISecurityManager _securityManager; private readonly IConfigurationManager _config; + private readonly IFileSystem _fileSystem; /// /// Gets the application host. @@ -113,7 +115,7 @@ namespace MediaBrowser.Common.Implementations.Updates /// The application host. private readonly IApplicationHost _applicationHost; - public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config) + public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicationPaths appPaths, IHttpClient httpClient, IJsonSerializer jsonSerializer, ISecurityManager securityManager, IConfigurationManager config, IFileSystem fileSystem) { if (logger == null) { @@ -129,6 +131,7 @@ namespace MediaBrowser.Common.Implementations.Updates _jsonSerializer = jsonSerializer; _securityManager = securityManager; _config = config; + _fileSystem = fileSystem; _logger = logger; } @@ -570,7 +573,7 @@ namespace MediaBrowser.Common.Implementations.Updates try { - File.Delete(tempFile); + _fileSystem.DeleteFile(tempFile); } catch (IOException e) { @@ -591,7 +594,7 @@ namespace MediaBrowser.Common.Implementations.Updates // Remove it the quick way for now _applicationHost.RemovePlugin(plugin); - File.Delete(plugin.AssemblyFilePath); + _fileSystem.DeleteFile(plugin.AssemblyFilePath); OnPluginUninstalled(plugin); -- cgit v1.2.3