It seems the FileInfoHeader <https://pkg.go.dev/archive/tar#FileInfoHeader>
does not handle junction points on windows. I expected it to handle it like
os.Readlink and just pretend its a symbolic link, but instead this error is
raised:
archive/tar: unknown file mode ?rw-rw-rw-
I don't know too much about junction points, but is there a reason not to
handle them here as symbolic links? or should I raise an issue about this?
Example code to replicate:
package main
import (
"archive/tar"
"fmt"
"os"
)
func main() {
path := "C:\\path\\to\\junction\\point"
fi, _ := os.Lstat(path)
_, err := tar.FileInfoHeader(fi, "link")
fmt.Println(err)
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/a3ae7d35-9bea-4646-919d-15bc28bfed24n%40googlegroups.com.