From e9d939ff2d11c7da123bc2d20bb9f096b5482124 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Tue, 18 Apr 2017 21:39:55 +0200 Subject: [PATCH] Update code for pkg/xattr v0.2.0 --- src/restic/node_xattr.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/restic/node_xattr.go b/src/restic/node_xattr.go index a61c44a97..2c117e029 100644 --- a/src/restic/node_xattr.go +++ b/src/restic/node_xattr.go @@ -12,8 +12,8 @@ import ( // Getxattr retrieves extended attribute data associated with path. func Getxattr(path, name string) ([]byte, error) { - b, e := xattr.Getxattr(path, name) - if err, ok := e.(*xattr.XAttrError); ok && err.Err == syscall.ENOTSUP { + b, e := xattr.Get(path, name) + if err, ok := e.(*xattr.Error); ok && err.Err == syscall.ENOTSUP { return nil, nil } return b, errors.Wrap(e, "Getxattr") @@ -22,8 +22,8 @@ func Getxattr(path, name string) ([]byte, error) { // Listxattr retrieves a list of names of extended attributes associated with the // given path in the file system. func Listxattr(path string) ([]string, error) { - s, e := xattr.Listxattr(path) - if err, ok := e.(*xattr.XAttrError); ok && err.Err == syscall.ENOTSUP { + s, e := xattr.List(path) + if err, ok := e.(*xattr.Error); ok && err.Err == syscall.ENOTSUP { return nil, nil } return s, errors.Wrap(e, "Listxattr") @@ -31,8 +31,8 @@ func Listxattr(path string) ([]string, error) { // Setxattr associates name and data together as an attribute of path. func Setxattr(path, name string, data []byte) error { - e := xattr.Setxattr(path, name, data) - if err, ok := e.(*xattr.XAttrError); ok && err.Err == syscall.ENOTSUP { + e := xattr.Set(path, name, data) + if err, ok := e.(*xattr.Error); ok && err.Err == syscall.ENOTSUP { return nil } return errors.Wrap(e, "Setxattr")