소스 검색

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

Fix plugin update exception
Claus Vium 4 년 전
부모
커밋
c49b854295
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)