path/filepath: Rel() fails on Windows when only one parameter has \\?\
prefix
#68847
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
Milestone
Go version
go version devel go1.24-47cdc43289 Mon Aug 12 13:09:41 2024 -0400 windows/amd64
Output of
go env
in your module/workspace:What did you do?
.\all.bat
What did you see happen?
What did you expect to see?
The demo CL (https://go-review.googlesource.com/c/go/+/604875/3) contains several expectations, but I'll pick one. I'm particularly surprised that the relative path from basepath
\\?\C:\foo
to targpath\\?\C:\foo\bar
is an error instead ofbar
.I'm a little out of my depth, but this Microsoft documentation (https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-file-namespaces) seems to indicate that
\\?\
is just a way of turning off string parsing in Windows APIs.I think it should be possible to work around this limitation, for instance by prefixing
\\?\
onto the parameters when they are already absolute paths.The text was updated successfully, but these errors were encountered: