aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-08 14:06:36 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-08 14:06:36 -0400
commit5babf400231553e5904c64ed6ea6953d93e1afc3 (patch)
treeda21ddb7927ebc8495d3b44804c0baf62fc67ef0
parentd57a50af3b3af5e389c1aff1bea34a1f2ada299e (diff)
update plugin uninstall
-rw-r--r--Emby.Server.Implementations/Updates/InstallationManager.cs14
1 files changed, 12 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs
index 57019cc4e..e7aa402f2 100644
--- a/Emby.Server.Implementations/Updates/InstallationManager.cs
+++ b/Emby.Server.Implementations/Updates/InstallationManager.cs
@@ -664,9 +664,19 @@ namespace Emby.Server.Implementations.Updates
// Remove it the quick way for now
_applicationHost.RemovePlugin(plugin);
- _logger.Info("Deleting plugin file {0}", plugin.AssemblyFilePath);
+ var path = plugin.AssemblyFilePath;
+ _logger.Info("Deleting plugin file {0}", path);
- _fileSystem.DeleteFile(plugin.AssemblyFilePath);
+ // Make this case-insensitive to account for possible incorrect assembly naming
+ var file = _fileSystem.GetFilePaths(path)
+ .FirstOrDefault(i => string.Equals(i, path, StringComparison.OrdinalIgnoreCase));
+
+ if (!string.IsNullOrWhiteSpace(file))
+ {
+ path = file;
+ }
+
+ _fileSystem.DeleteFile(path);
OnPluginUninstalled(plugin);