From f86cd7ae8cccb04d1002d032e3c6acd4ed881399 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Thu, 11 Oct 2018 12:38:49 -0400 Subject: [PATCH] Minor code cleanup --- .../Components/StaticFiles/Configuration.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs index 52bcd6b398..dcf009a8f6 100644 --- a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs +++ b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs @@ -282,10 +282,11 @@ namespace Tgstation.Server.Host.Components.StaticFiles var ignoreFileBytes = await ioManager.ReadAllBytes(StaticIgnorePath(), cancellationToken).ConfigureAwait(false); var ignoreFileText = Encoding.UTF8.GetString(ignoreFileBytes); - //we don't want to lose trailing whitespace on linux - var results = new List { StaticIgnoreFile }; - using (var reader = new StringReader(ignoreFileText)) { + + //we don't want to lose trailing whitespace on linux + using (var reader = new StringReader(ignoreFileText)) + { cancellationToken.ThrowIfCancellationRequested(); var line = await reader.ReadLineAsync().ConfigureAwait(false); if (!String.IsNullOrEmpty(line)) @@ -306,7 +307,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles task = ioManager.GetDirectories(GameStaticFilesSubdirectory, cancellationToken); var entries = await task.ConfigureAwait(false); - await Task.WhenAll(task.Result.Select(async x => + await Task.WhenAll(entries.Select(async x => { var fileName = ioManager.GetFileName(x);