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

@gopherbot gopherbot commented Dec 2, 2014

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

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Dec 2, 2014

Comment 1:

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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Dec 2, 2014

Comment 2:

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

@gopherbot gopherbot added new labels Dec 2, 2014
@bradfitz bradfitz modified the milestone: Go1.5 Dec 16, 2014
@mattn

This comment has been minimized.

Copy link
Member

@mattn mattn commented Dec 19, 2014

@alexbrainman

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Jan 20, 2015

@alexbrainman

This comment has been minimized.

Copy link
Member

@alexbrainman alexbrainman commented Jan 20, 2015

@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.