From 918687d57fc00073295d1072741502e9a15aa5f8 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 11 Aug 2024 09:56:37 -0400 Subject: [PATCH] Fix the homepage logo not working on Windows after updating --- .../Controllers/RootController.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Tgstation.Server.Host/Controllers/RootController.cs b/src/Tgstation.Server.Host/Controllers/RootController.cs index df363970bb3..577fecf1c64 100644 --- a/src/Tgstation.Server.Host/Controllers/RootController.cs +++ b/src/Tgstation.Server.Host/Controllers/RootController.cs @@ -152,11 +152,17 @@ public IActionResult Index() [HttpGet("logo.svg")] public IActionResult GetLogo() { - var logoFileName = platformIdentifier.IsWindows // these are different because of motherfucking line endings -_- - ? LogoSvgWindowsName - : LogoSvgLinuxName; + // these are different because of motherfucking line endings -_- + if (platformIdentifier.IsWindows) + { + VirtualFileResult? result = this.TryServeFile(hostEnvironment, logger, $"{LogoSvgWindowsName}.svg"); + if (result != null) + return result; + + // BUT THE UPDATE PACKAGES ARE BUILT ON LINUX RAAAAAGH + } - return (IActionResult?)this.TryServeFile(hostEnvironment, logger, $"{logoFileName}.svg") ?? NotFound(); + return (IActionResult?)this.TryServeFile(hostEnvironment, logger, $"{LogoSvgLinuxName}.svg") ?? NotFound(); } ///