From eb1721fd7200deb6db6dbefff3d15236314d05fa Mon Sep 17 00:00:00 2001 From: patchzyy <64382339+patchzyy@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:45:46 +0200 Subject: [PATCH] Update NativeBuildFlags.ps1 --- Launcher/NativeBuildFlags.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Launcher/NativeBuildFlags.ps1 b/Launcher/NativeBuildFlags.ps1 index 50825f0..5402643 100644 --- a/Launcher/NativeBuildFlags.ps1 +++ b/Launcher/NativeBuildFlags.ps1 @@ -42,7 +42,9 @@ function Get-MkwToolchainPath([string]$ToolchainRoot) { function Get-MkwShellSafeToolchainRoot([string]$ToolchainRoot) { if ([string]::IsNullOrWhiteSpace($ToolchainRoot)) { throw 'A toolchain root is required.' } - $full = [IO.Path]::GetFullPath($ToolchainRoot).TrimEnd('\') + $full = [IO.Path]::GetFullPath($ToolchainRoot) + # A drive root keeps its separator: "C:" is relative to the current directory on that drive. + if ($full -ne [IO.Path]::GetPathRoot($full)) { $full = $full.TrimEnd('\') } if ($full -notmatch '[()&^%!]') { return $full } $sha = [Security.Cryptography.SHA256]::Create()