diff options
| author | qmuntal <quimmuntal@gmail.com> | 2023-10-19 18:06:27 +0200 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2024-02-07 20:54:38 +0000 |
| commit | c0984005487b293b4bb2f92e8cd9b58422f7831e (patch) | |
| tree | 4a7ca58fc67fda1bf8b00ae85c72949e031fa22f /src/internal/syscall/windows | |
| parent | 28b8851671a0254ed0e46ce8dbec43ebe73e7132 (diff) | |
| download | go-c0984005487b293b4bb2f92e8cd9b58422f7831e.tar.xz | |
runtime,internal/syscall/windows: remove long path support check
The runtime currently enables long path support process-wide by updating
the process environment block (PEB). It then tries to create a file
using a long path to check if the PEB update made any difference.
There hasn't been any report that the PEB update was not effective,
and the check itself is quite tricky, so it's time to remove it.
While here, linkname `runtime.canUseLongPaths` to a variable in
internal/syscall/windows instead of the os package so it is easier to
consume from other packages.
Change-Id: I549380b7f2c242dc4db20d5be603840282de69b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/536495
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/internal/syscall/windows')
| -rw-r--r-- | src/internal/syscall/windows/syscall_windows.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go index a02c96c8f0..03ceb5803f 100644 --- a/src/internal/syscall/windows/syscall_windows.go +++ b/src/internal/syscall/windows/syscall_windows.go @@ -10,6 +10,12 @@ import ( "unsafe" ) +// CanUseLongPaths is true when the OS supports opting into +// proper long path handling without the need for fixups. +// +//go:linkname CanUseLongPaths +var CanUseLongPaths bool + // UTF16PtrToString is like UTF16ToString, but takes *uint16 // as a parameter instead of []uint16. func UTF16PtrToString(p *uint16) string { |
