From 7681a63fdb199bce41551667eae247a265dcdc96 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 21 Aug 2022 10:47:05 +0200 Subject: [PATCH] restic: Cleanup xattr error handling for Solaris Since xattr 0.4.8 (https://github.com/pkg/xattr/pull/68) returns ENOTSUP similar to Linux. --- internal/restic/node_xattr.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/restic/node_xattr.go b/internal/restic/node_xattr.go index 307cc33e0..a2eed39c0 100644 --- a/internal/restic/node_xattr.go +++ b/internal/restic/node_xattr.go @@ -35,12 +35,10 @@ func handleXattrErr(err error) error { return nil case *xattr.Error: - // On Solaris, xattr not being supported on a file is signaled - // by EINVAL (https://github.com/pkg/xattr/issues/67). // On Linux, xattr calls on files in an SMB/CIFS mount can return // ENOATTR instead of ENOTSUP. switch e.Err { - case syscall.EINVAL, syscall.ENOTSUP, xattr.ENOATTR: + case syscall.ENOTSUP, xattr.ENOATTR: return nil } return errors.WithStack(e)