fix(install.ps1): record 'skipped-long-path' when ConvertTo-LongPath short-circuits
The ordinary-long-path early return now records why no resolver ran, so the ResolvedPathReport stays truthful instead of silently inheriting a stale value from an earlier call in the same session. Diagnostics hunk taken from PR #93100. Co-authored-by: aniruddhaadak80 <aniruddhaadak80@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -248,7 +248,10 @@ function ConvertTo-LongPath {
|
||||
if ([string]::IsNullOrWhiteSpace($Path)) { return $Path }
|
||||
# Only 8.3 short names carry a tilde+digit ("~1"); skip every resolver for
|
||||
# ordinary long paths, which is the overwhelmingly common case.
|
||||
if ($Path -notmatch '~\d') { return $Path }
|
||||
if ($Path -notmatch '~\d') {
|
||||
$script:LastResolver = 'skipped-long-path'
|
||||
return $Path
|
||||
}
|
||||
|
||||
# 1. kernel32. Compiled on first use only, so a normal profile never pays
|
||||
# the Add-Type cost (this file is re-entered once per install stage).
|
||||
|
||||
Reference in New Issue
Block a user