diff --git a/keywords.go b/keywords.go index 0d5eed1..f00a331 100644 --- a/keywords.go +++ b/keywords.go @@ -216,7 +216,10 @@ var ( } linkKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (string, error) { if sys, ok := info.Sys().(*tar.Header); ok { - return sys.Linkname, nil + if sys.Linkname != "" { + return fmt.Sprintf("link=%s", sys.Linkname), nil + } + return "", nil } if info.Mode()&os.ModeSymlink != 0 {