소스 검색

Use 'Length' instead of 'Any()' for an array

Mark Monteiro 5 년 전
부모
커밋
4bccaafb57
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      MediaBrowser.WebDashboard/Api/DashboardService.cs

+ 1 - 1
MediaBrowser.WebDashboard/Api/DashboardService.cs

@@ -140,7 +140,7 @@ namespace MediaBrowser.WebDashboard.Api
             if (appConfig.HostWebClient())
             {
                 string webContentPath = DashboardUIPath;
-                if (!Directory.Exists(webContentPath) || !Directory.GetFiles(webContentPath).Any())
+                if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
                 {
                     throw new InvalidOperationException(
                         "The server is expected to host the web client, but the provided content directory is either " +