Переглянути джерело

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())
             if (appConfig.HostWebClient())
             {
             {
                 string webContentPath = DashboardUIPath;
                 string webContentPath = DashboardUIPath;
-                if (!Directory.Exists(webContentPath) || !Directory.GetFiles(webContentPath).Any())
+                if (!Directory.Exists(webContentPath) || Directory.GetFiles(webContentPath).Length == 0)
                 {
                 {
                     throw new InvalidOperationException(
                     throw new InvalidOperationException(
                         "The server is expected to host the web client, but the provided content directory is either " +
                         "The server is expected to host the web client, but the provided content directory is either " +