keywords: don't fail on presence of "flags"
BSD file's support "flags". These have some similarity with xattr, but for specific features, rather than general purpose key/values. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
84f1e6ebc6
commit
e45837faea
3 changed files with 23 additions and 1 deletions
|
@ -14,6 +14,11 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
// this is bsd specific https://www.freebsd.org/cgi/man.cgi?query=chflags&sektion=2
|
||||
flagsKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
unameKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (string, error) {
|
||||
if hdr, ok := info.Sys().(*tar.Header); ok {
|
||||
return fmt.Sprintf("uname=%s", hdr.Uname), nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue