diff options
| author | qmuntal <quimmuntal@gmail.com> | 2023-08-23 16:52:37 +0200 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2023-08-25 08:48:18 +0000 |
| commit | dd38ade8d1f2cbe938604fbb34a69533cb128310 (patch) | |
| tree | 16a1cc87b3e2c2845da8cebbfe29cfb035d5ddee /src | |
| parent | 0a17b2c174dcbe0f30a19be2ca5517ed0660f706 (diff) | |
| download | go-dd38ade8d1f2cbe938604fbb34a69533cb128310.tar.xz | |
os: omit existence check for GetFinalPathNameByHandle
GetFinalPathNameByHandle exists since Windows Vista, which we no longer
support, so we don't need to prove that it exists before using it.
Updates #57003
Change-Id: Iff2bbe51d3baa3aabcaacf39ea3cbeda0088b9d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/522195
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/internal/syscall/windows/syscall_windows.go | 4 | ||||
| -rw-r--r-- | src/os/file_windows.go | 6 |
2 files changed, 0 insertions, 10 deletions
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go index 68778e7764..ab4ad2ec64 100644 --- a/src/internal/syscall/windows/syscall_windows.go +++ b/src/internal/syscall/windows/syscall_windows.go @@ -365,10 +365,6 @@ const ( //sys GetFinalPathNameByHandle(file syscall.Handle, filePath *uint16, filePathSize uint32, flags uint32) (n uint32, err error) = kernel32.GetFinalPathNameByHandleW -func LoadGetFinalPathNameByHandle() error { - return procGetFinalPathNameByHandleW.Find() -} - func ErrorLoadingGetTempPath2() error { return procGetTempPath2W.Find() } diff --git a/src/os/file_windows.go b/src/os/file_windows.go index c77d182fae..63d53a1df8 100644 --- a/src/os/file_windows.go +++ b/src/os/file_windows.go @@ -377,12 +377,6 @@ func normaliseLinkPath(path string) (string, error) { // handle paths, like \??\Volume{abc}\... - err := windows.LoadGetFinalPathNameByHandle() - if err != nil { - // we must be using old version of Windows - return "", err - } - h, err := openSymlink(path) if err != nil { return "", err |
