Skip to content

Commit fafa933

Browse files
committed
fix(windows): use case-insensitive install path matching
1 parent b34c91c commit fafa933

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src-tauri/windows/kill-backend-processes.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if ([string]::IsNullOrWhiteSpace($installRootRaw)) {
1919
exit 0
2020
}
2121

22-
$installRoot = $installRootRaw.ToLowerInvariant()
22+
$installRoot = $installRootRaw
2323
$installRootWithSep = $installRoot + [string][char]92
2424
$currentPid = $PID
2525
$targetProcessNames = @(
@@ -40,8 +40,8 @@ function Test-IsUnderInstallRoot {
4040
}
4141

4242
try {
43-
$normalized = [System.IO.Path]::GetFullPath($PathValue).TrimEnd([char]92).ToLowerInvariant()
44-
return $normalized -eq $installRoot -or $normalized.StartsWith($installRootWithSep)
43+
$normalized = [System.IO.Path]::GetFullPath($PathValue).TrimEnd([char]92)
44+
return $normalized -ieq $installRoot -or $normalized.StartsWith($installRootWithSep, [System.StringComparison]::OrdinalIgnoreCase)
4545
} catch {
4646
return $false
4747
}

0 commit comments

Comments
 (0)