diff options
| author | JPVenson <ger-delta-07@hotmail.de> | 2024-12-06 17:59:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-06 17:59:27 +0100 |
| commit | fe1aab034e01c3837c6afcd552d8d7eb884e822d (patch) | |
| tree | e8092ec51835d8cf74322c6379061a060277bbfb /Emby.Server.Implementations/Plugins/PluginManager.cs | |
| parent | 3b18a36ba5fcc47ae93b30e6a2d5149bdf04fff0 (diff) | |
| parent | 1feceea508726f45e88d665597796cd75f430234 (diff) | |
Merge branch 'jellyfin:master' into feature/EFUserData
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 37 |
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); } } |
