Skip to content

Commit

Permalink
restic: Cleanup xattr error handling for Solaris
Browse files Browse the repository at this point in the history
Since xattr 0.4.8 (pkg/xattr#68) returns ENOTSUP
similar to Linux.
  • Loading branch information
MichaelEischer committed Aug 21, 2022
1 parent 524196f commit 6cadfdd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/restic/node_xattr.go
Expand Up @@ -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)
Expand Down

0 comments on commit 6cadfdd

Please sign in to comment.