浏览代码

Fix plugin update exception

crobibero 4 年之前
父节点
当前提交
5845bf93cb
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Emby.Server.Implementations/ApplicationHost.cs

+ 6 - 0
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)