You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, a symlink to a directory is reported as a directory and a symlink at the same time. This confuses tar.FileInfoHeader, which reports the object as a directory, whereas on UNIX systems it would be reported as a symlink. I believe it makes much more sense to report a symlink.
What version of Go are you using (go version)?
$ go version
go version go1.7.1 windows/amd64
What operating system and processor architecture are you using (go env)?
$ go env
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=x:\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
On Windows, this returns Typeflag: 5, Mode: 0x41ff, Linkname: ""
What did you see instead?
I'd expect to see Typeflag: 2, Mode: 0xa1ff, Linkname: "directorysymlink", as is reported on non-Windows systems.
The text was updated successfully, but these errors were encountered:
quentinmit
changed the title
On Windows tar.FileInfoHeader reports directory symlinks as a directory, not a symlink
archive/tar: FileInfoHeader cannot parse Windows directory symlinks
Oct 21, 2016
On Windows, a symlink to a directory is reported as a directory and a symlink at the same time. This confuses tar.FileInfoHeader, which reports the object as a directory, whereas on UNIX systems it would be reported as a symlink. I believe it makes much more sense to report a symlink.
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Run the following program:
What did you expect to see?
On Windows, this returns
Typeflag: 5, Mode: 0x41ff, Linkname: ""
What did you see instead?
I'd expect to see
Typeflag: 2, Mode: 0xa1ff, Linkname: "directorysymlink"
, as is reported on non-Windows systems.The text was updated successfully, but these errors were encountered: