aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Plugins
diff options
context:
space:
mode:
authorRealGreenDragon <14246920+RealGreenDragon@users.noreply.github.com>2024-12-02 01:09:30 +0100
committerGitHub <noreply@github.com>2024-12-01 17:09:30 -0700
commitf1e020c0b061dce8af1a0483eaccd6eed22f9399 (patch)
tree623f1ed7e425b511ec186d3b70dcbc185500361e /Emby.Server.Implementations/Plugins
parent06923cbf2be23ee276641bd6d461e6f1790b8bf0 (diff)
Removed RemoveOldPlugins configuration flag (#13102)
Diffstat (limited to 'Emby.Server.Implementations/Plugins')
-rw-r--r--Emby.Server.Implementations/Plugins/PluginManager.cs37
1 files changed, 17 insertions, 20 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs
index e7323d9d0..4c32d5717 100644
--- a/Emby.Server.Implementations/Plugins/PluginManager.cs
+++ b/Emby.Server.Implementations/Plugins/PluginManager.cs
@@ -785,30 +785,27 @@ namespace Emby.Server.Implementations.Plugins
var cleaned = false;
var path = entry.Path;
- if (_config.RemoveOldPlugins)
+ // Attempt a cleanup of old folders.
+ try
{
- // Attempt a cleanup of old folders.
- try
- {
- _logger.LogDebug("Deleting {Path}", path);
- Directory.Delete(path, true);
- cleaned = true;
- }
+ _logger.LogDebug("Deleting {Path}", path);
+ Directory.Delete(path, true);
+ cleaned = true;
+ }
#pragma warning disable CA1031 // Do not catch general exception types
- catch (Exception e)
+ catch (Exception e)
#pragma warning restore CA1031 // Do not catch general exception types
- {
- _logger.LogWarning(e, "Unable to delete {Path}", path);
- }
+ {
+ _logger.LogWarning(e, "Unable to delete {Path}", path);
+ }
- if (cleaned)
- {
- versions.RemoveAt(x);
- }
- else
- {
- ChangePluginState(entry, PluginStatus.Deleted);
- }
+ if (cleaned)
+ {
+ versions.RemoveAt(x);
+ }
+ else
+ {
+ ChangePluginState(entry, PluginStatus.Deleted);
}
}