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
io/ioutil: ReadDir fails to list directory for bare drive path #45514
Comments
For Windows API FindFirstFile, if the parameter is the program running drive letter and there is no "\" after the drive letter, the list of files in the program running directory will be output. recommended "os\file_windows.go " Adding "\" in 115 line splicing path |
CC @griesemer @ianlancetaylor @bradfitz via https://dev.golang.org/owners. We don't actually seem to have granular owners for @adminck have you tried using |
Of course, if this is broken in some new way, we should fix it. |
Isn't this the intended behaviour? Windows keeps a separate working directory per drive letter and I presume this is how to access it? Why do you expect a readdir for a non-rooted path to return the root directory's contents? |
Works as intended. Run |
Closing as working as intended |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
YES
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create new program from scratch, write,build:
File running path “F:\test\”
What did you expect to see?
Output f root directory file list
What did you see instead?
Output “F:\test\” directory file list
The text was updated successfully, but these errors were encountered: