From c20400fa40d88329b1187aed84ead66e8cae4dde Mon Sep 17 00:00:00 2001 From: Neil Burrows Date: Mon, 22 Jun 2020 10:13:28 +0100 Subject: Prevent system plugins from being uninstalled --- Emby.Server.Implementations/Updates/InstallationManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs') diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 80326fddf..0e912dfe9 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -402,6 +402,12 @@ namespace Emby.Server.Implementations.Updates /// The plugin. public void UninstallPlugin(IPlugin plugin) { + if (!plugin.CanUninstall) + { + _logger.LogInformation("Attempt to delete non removable plugin {0}", plugin.Name); + return; + } + plugin.OnUninstalling(); // Remove it the quick way for now -- cgit v1.2.3