Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: ReadDir("\\tsclient\d\") fails with go1.21 on Windows #62044

Closed
ThisIsN3w opened this issue Aug 15, 2023 · 2 comments
Closed

os: ReadDir("\\tsclient\d\") fails with go1.21 on Windows #62044

ThisIsN3w opened this issue Aug 15, 2023 · 2 comments

Comments

@ThisIsN3w
Copy link

ThisIsN3w commented Aug 15, 2023

In 1.20, it can work.
but in 1.21,fail.

What version of Go are you using (go version)?

C:\Users\Administrator\Desktop>go version
go version go1.21.0 windows/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOENV=C:\Users\Administrator\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\Administrator\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\Administrator\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=D:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\Administrator\Desktop\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\ADMINI~1\AppData\Local\Temp\go-build2292448789=/tmp/go-build -gno-record-gcc-switches

What did you do?

package main

import (
	"log"
	"os"
)

func main() {
	dirs, err := os.ReadDir("\\\\tsclient\\d\\")
	if err != nil {
		log.Fatalln(err)
	}
	for _, dirName := range dirs {
		log.Println(dirName.Name())
	}
}

What did you expect to see?

C:\Users\Administrator\Desktop>test-1.20.exe
2023/08/15 20:37:14 $RECYCLE.BIN
2023/08/15 20:37:14 Backup
2023/08/15 20:37:14 BCompare

What did you see instead?

C:\Users\Administrator\Desktop>test-1.21.exe
2023/08/15 21:34:21 GetFileInformationByHandleEx \\tsclient\d\: The parameter is incorrect.
@qmuntal
Copy link
Contributor

qmuntal commented Aug 15, 2023

Thanks for reporting. This seems to be the same as #61907, which is being worked out.

@bcmills
Copy link
Contributor

bcmills commented Aug 15, 2023

Duplicate of #61907

@bcmills bcmills marked this as a duplicate of #61907 Aug 15, 2023
@bcmills bcmills closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants