From 35c5f33fbb2a677d13d230b08a5bc90a59a9d813 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Fri, 1 Aug 2025 15:11:17 -0400 Subject: [PATCH] FUCK WINDOWS ALL MY HOMIES HATE WINDOWS --- src/Tgstation.Server.Host/IO/DefaultIOManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Tgstation.Server.Host/IO/DefaultIOManager.cs b/src/Tgstation.Server.Host/IO/DefaultIOManager.cs index 3c947067a0..5e30e756df 100644 --- a/src/Tgstation.Server.Host/IO/DefaultIOManager.cs +++ b/src/Tgstation.Server.Host/IO/DefaultIOManager.cs @@ -257,7 +257,12 @@ namespace Tgstation.Server.Host.IO public string ResolvePath(string path) { if (fileSystem.Path.IsPathRooted(path ?? throw new ArgumentNullException(nameof(path)))) - return path; + { + // Important to evaluate the path anyway to normalize front slashes to backslashes on Windows + // Some tools (looking at you netsh.exe) bitch if you pass them forward slashes as directory separators + // Can't rely on ResolvePathCore to do this either because its contract stipulates a relative path + return fileSystem.Path.GetFullPath(path); + } return ResolvePathCore(path); }