mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-03 14:28:28 +00:00
*: switch everything to govis
Now that we have govis, move everything to using govis.{Vis,Unvis} and then remove the cvis build tags (because that code no longer exists). Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
91d7ec8c89
commit
c5ec1c9f3a
21 changed files with 26 additions and 1252 deletions
8
tar.go
8
tar.go
|
@ -9,6 +9,8 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/vbatts/go-mtree/pkg/govis"
|
||||
)
|
||||
|
||||
// Streamer creates a file hierarchy out of a tar stream
|
||||
|
@ -128,7 +130,7 @@ hdrloop:
|
|||
return
|
||||
}
|
||||
// Alright, it's either file or directory
|
||||
encodedName, err := Vis(filepath.Base(hdr.Name), DefaultVisFlags)
|
||||
encodedName, err := govis.Vis(filepath.Base(hdr.Name), DefaultVisFlags)
|
||||
if err != nil {
|
||||
tmpFile.Close()
|
||||
os.Remove(tmpFile.Name())
|
||||
|
@ -148,7 +150,7 @@ hdrloop:
|
|||
log.Println(err)
|
||||
break
|
||||
}
|
||||
linkname, err := Unvis(KeyVal(kv).Value())
|
||||
linkname, err := govis.Unvis(KeyVal(kv).Value(), DefaultVisFlags)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
break
|
||||
|
@ -248,7 +250,7 @@ func populateTree(root, e *Entry, hdr *tar.Header) error {
|
|||
dirNames := strings.Split(wd, "/")
|
||||
parent := root
|
||||
for _, name := range dirNames[:] {
|
||||
encoded, err := Vis(name, DefaultVisFlags)
|
||||
encoded, err := govis.Vis(name, DefaultVisFlags)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue