-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: Windows named pipes are listed as regular by Stat #41755
Comments
When calling os.Stat( Lines 63 to 75 in bb48f99
So the filetype field that is used by Most easy way to detect that the path is pipe is checking the path start with \.\pipe. but this is ugly. |
Same as @mattn . I do not know how to determine if opened file is named pipe or not. Alex |
Change https://golang.org/cl/373354 mentions this issue: |
(CC @golang/windows) |
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
OutputThe underlying OS is Windows 10, version 2004.
What did you do?
I ran os.Stat, passing an existing pipe as an example. Source code for this can be found at https://play.golang.org/p/a1O5axVpLOO
In this example, the Pipe is created in the Golang program, but the issue is also reproducible when using a different, existing pipe.
What did you expect to see?
The FileInfo should have ModeNamedPipe set.
What did you see instead?
The FileInfo had no ModeNamedPipe set and was listed as a regular file.
Output from the example code:
The text was updated successfully, but these errors were encountered: