We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It appears that directory junction created with junction.exe (available from Microsoft at: https://technet.microsoft.com/en-us/sysinternals/bb896768) cannot be os.Stat(ed):
c:\a>dir Volume in drive C has no label. Volume Serial Number is 1234-5678 Directory of c:\a 22/06/2016 03:48 PM <DIR> . 22/06/2016 03:48 PM <DIR> .. 22/06/2016 03:42 PM 162 main.go 1 File(s) 162 bytes 2 Dir(s) 3,354,419,200 bytes free c:\a>mkdir dir c:\a>echo "abc" > dir\file.txt c:\a>mklink /J mklink dir Junction created for mklink <<===>> dir c:\a>junction junction dir Junction v1.06 - Windows junction creator and reparse point viewer Copyright (C) 2000-2010 Mark Russinovich Sysinternals - www.sysinternals.com Created: c:\a\junction Targetted at: c:\a\dir c:\a>dir Volume in drive C has no label. Volume Serial Number is 1234-5678 Directory of c:\a 22/06/2016 03:48 PM <DIR> . 22/06/2016 03:48 PM <DIR> .. 22/06/2016 03:48 PM <DIR> dir 22/06/2016 03:48 PM <JUNCTION> junction [\??\c:\a\dir] 22/06/2016 03:42 PM 162 main.go 22/06/2016 03:48 PM <JUNCTION> mklink [c:\a\dir] 1 File(s) 162 bytes 5 Dir(s) 3,354,419,200 bytes free c:\a>type mklink\file.txt "abc" c:\a>type junction\file.txt "abc" c:\a>junction mklink Junction v1.06 - Windows junction creator and reparse point viewer Copyright (C) 2000-2010 Mark Russinovich Sysinternals - www.sysinternals.com c:\a\mklink: JUNCTION Print Name : c:\a\dir Substitute Name: c:\a\dir c:\a>junction junction Junction v1.06 - Windows junction creator and reparse point viewer Copyright (C) 2000-2010 Mark Russinovich Sysinternals - www.sysinternals.com c:\a\junction: JUNCTION Substitute Name: c:\a\dir c:\a>type main.go package main import ( "fmt" "log" "os" ) func main() { fi, err := os.Stat(os.Args[1]) if err != nil { log.Fatal(err) } fmt.Printf("%s\n", fi.Name()) } c:\a>go version go version devel +1f44643 Wed Jun 22 00:12:55 2016 +0000 windows/amd64 c:\a>go run main.go mklink dir c:\a>go run main.go junction 2016/06/22 15:50:00 Lstat : The system cannot find the path specified. exit status 1 c:\a>
Alex
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/25320 mentions this issue.
Sorry, something went wrong.
os: add new tests for symbolic links and directory junctions
81b9af7
Updates #15978 Updates #16145 Change-Id: I161f5bc97d41c08bf5e1405ccafa86232d70886d Reviewed-on: https://go-review.googlesource.com/25320 Run-TryBot: Alex Brainman <alex.brainman@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
CL https://golang.org/cl/31118 mentions this issue.
e65bce7
No branches or pull requests
It appears that directory junction created with junction.exe (available from Microsoft at: https://technet.microsoft.com/en-us/sysinternals/bb896768) cannot be os.Stat(ed):
Alex
The text was updated successfully, but these errors were encountered: