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

This commit is contained in:
Mark Monteiro 2020-03-24 16:27:54 +01:00
parent aa546dd36a
commit 4bccaafb57

View File

@ -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 " +