mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-02 13:58:30 +00:00
vis: adding a pure golang Vis()
The current Vis() and Unvis() are using the C implementation from MTREE(8). But that means that cgo is used, which is not always desired. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e42c679e89
commit
08b1000418
19 changed files with 580 additions and 61 deletions
|
@ -119,7 +119,7 @@ var (
|
|||
linkKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (KeyVal, error) {
|
||||
if sys, ok := info.Sys().(*tar.Header); ok {
|
||||
if sys.Linkname != "" {
|
||||
linkname, err := Vis(sys.Linkname)
|
||||
linkname, err := Vis(sys.Linkname, DefaultVisFlags)
|
||||
if err != nil {
|
||||
return emptyKV, err
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ var (
|
|||
if err != nil {
|
||||
return emptyKV, err
|
||||
}
|
||||
linkname, err := Vis(str)
|
||||
linkname, err := Vis(str, DefaultVisFlags)
|
||||
if err != nil {
|
||||
return emptyKV, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue