Merge pull request #4476 from crobibero/plugin-update-exception

Fix plugin update exception
This commit is contained in:
Claus Vium 2020-11-14 12:45:07 +01:00 committed by GitHub
commit c49b854295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)