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: Windows: os.Stat() failed for junctions #9190

Closed
gopherbot opened this issue Dec 2, 2014 · 5 comments
Closed

os: Windows: os.Stat() failed for junctions #9190

gopherbot opened this issue Dec 2, 2014 · 5 comments
Milestone

Comments

@gopherbot
Copy link

by KoRoN.KaoriYa:

Target version: go1.4rc2.windows-amd64


Steps to reproduce:

1. make a junction: mklink /j C:\junction C:\Windows
2. apply os.Stat() to that junction: os.Stat(`C:\junction`)


What happened?:

os.Stat() returns an error always.


What should have happened instead?

Return valid os.FileInfo without any errors.


Please provide any additional information below.

For junctions, file attribute are reported as REPARSE_POINT (ModeSymLink).
But its ReparseTag is MOUNTPOINT, not SYMLINK.
(see http://msdn.microsoft.com/en-us/library/cc232007.aspx)
It makes syscall.Readlink() failed, so os.Stat() is failed too.
@gopherbot
Copy link
Author

Comment 1:

CL https://golang.org/cl/180500043 mentions this issue.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Labels changed: added repo-main, release-go1.5, os-windows.

@bradfitz bradfitz modified the milestone: Go1.5 Dec 16, 2014
@mattn
Copy link
Member

mattn commented Dec 19, 2014

@alexbrainman
Copy link
Member

@alexbrainman
Copy link
Member

and another new CL is https://go-review.googlesource.com/#/c/2307/

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants