diff options
| author | Claus Vium <cvium@users.noreply.github.com> | 2020-11-14 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-14 12:45:07 +0100 |
| commit | c49b8542959cf97c2d7aae7429f1e942d11a55b1 (patch) | |
| tree | 5c20e29441b353b75044e8901a256b4343b10c40 | |
| parent | 722adda47737d6da261e51819fa41d5e6a46e021 (diff) | |
| parent | 5845bf93cb7e55f22f42378e55f0da4b02ba0a46 (diff) | |
Merge pull request #4476 from crobibero/plugin-update-exception
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) |
