Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: Windows: os.Stat() failed for junctions #9190
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.