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
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Read an existing tar file with tar.Reader
2. Use FileInfo representation of Header (fi := hdr.FileInfo())
3. Call fi.Name()
4. http://play.golang.org/p/yQXR3n1Shf demonstrates the bug.
What is the expected output?
According to the documentation of os.FileInfo I expect the base name as output.
What do you see instead?
The full path of the file in the tar archive.
Which compiler are you using (5g, 6g, 8g, gccgo)?
-
Which operating system are you using?
Ubuntu 13.04 64-bit
Which version are you using? (run 'go version')
go version go1.1.2 linux/amd64
Please provide any additional information below.
The problem seems to be here:
http://golang.org/src/pkg/archive/tar/common.go?s=2710:2755#L78
The documentation for the Method of this internal struct says it returns the base name,
but it actually returns the full path.
The text was updated successfully, but these errors were encountered:
by christian.h7r:
The text was updated successfully, but these errors were encountered: