Commit cbc7aa0
[release/10.0] Add ERROR_NETNAME_DELETED to IsPathUnreachableError for Windows localhost removal (#124869)
Backport of #121569 to release/10.0
/cc @jozkee @Copilot
## Customer Impact
- [ ] Customer reported
- [x] Found internally
This only affects `ResolveLinkTarget(returnFinalTarget: true)`. Code
first tries to open the final file via `OpenSafeFileHandle` as an
optimized approach, and when that fails it checks IsPathUnreachableError
to decide whether to fall back to manually traversal with
`DeviceIoControl`. Since `ERROR_NETNAME_DELETED` was not being
categorized as a path unreachable error, the fallback never happens and
an `IOException` is thrown instead.
We don't have customer reports yet, but we expect them to come
eventually, and this is technically a `regression-from-last-release`.
## Regression
- [x] Yes
- [ ] No
This is a regression caused by a Windows OS update that removed
localhost support. The error started appearing in CI builds around
October 2025.
## Testing
The original PR #121569 was merged to main on November 13, 2025 and
resolved the CI failures.
## Risk
Low. The change adds a single error code constant (ERROR_NETNAME_DELETED
= 0x40) and includes it in the existing `IsPathUnreachableError` pattern
match alongside other similar network path error codes
(ERROR_BAD_NETPATH, ERROR_BAD_NET_NAME, ERROR_NETWORK_ACCESS_DENIED,
etc.)
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>1 parent 19e7456 commit cbc7aa0
File tree
2 files changed
+2
-0
lines changed- src/libraries/Common/src
- Interop/Windows
- System/IO
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
0 commit comments