mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-20 21:40:27 +00:00
keyword: add missing gname
keyword functions
Fixes: #128 Reported-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
469590a575
commit
68651d77d6
4 changed files with 31 additions and 0 deletions
|
@ -20,6 +20,12 @@ var (
|
|||
}
|
||||
return emptyKV, nil
|
||||
}
|
||||
gnameKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (KeyVal, error) {
|
||||
if hdr, ok := info.Sys().(*tar.Header); ok {
|
||||
return KeyVal(fmt.Sprintf("gname=%s", hdr.Gname)), nil
|
||||
}
|
||||
return emptyKV, nil
|
||||
}
|
||||
uidKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (KeyVal, error) {
|
||||
if hdr, ok := info.Sys().(*tar.Header); ok {
|
||||
return KeyVal(fmt.Sprintf("uid=%d", hdr.Uid)), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue