diff options
| author | crobibero <cody@robibe.ro> | 2020-11-13 14:52:22 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-13 14:52:22 -0700 |
| commit | 5845bf93cb7e55f22f42378e55f0da4b02ba0a46 (patch) | |
| tree | 4b55bb8106898024942b5076e64da127c4fd70b6 | |
| parent | f45b4ac11fa75056f52e29c7dac17f89b4e43b28 (diff) | |
Fix plugin update exception
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 9d5b651d9..f3bd95d80 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -996,6 +996,12 @@ namespace Emby.Server.Implementations { var minimumVersion = new Version(0, 0, 0, 1); var versions = new List<LocalPlugin>(); + if (!Directory.Exists(path)) + { + // Plugin path doesn't exist, don't try to enumerate subfolders. + return Enumerable.Empty<LocalPlugin>(); + } + var directories = Directory.EnumerateDirectories(path, "*.*", SearchOption.TopDirectoryOnly); foreach (var dir in directories) |
