diff --git a/changelog/unreleased/issue-5344 b/changelog/unreleased/issue-5344 new file mode 100644 index 000000000..38119d0ec --- /dev/null +++ b/changelog/unreleased/issue-5344 @@ -0,0 +1,7 @@ +Bugfix: Ignore EOPNOTSUPP as an error for xattr + +Restic 0.18.0 added xattr support for NetBSD 10+, but not all NetBSD +filesystems support xattrs. Other BSD systems can likewise return +EOPNOTSUPP, so restic now simply ignores EOPNOTSUPP errors for xattrs. + +https://github.com/restic/restic/issues/5344 diff --git a/internal/fs/node_xattr.go b/internal/fs/node_xattr.go index 2a2b5c0fb..f1119fe51 100644 --- a/internal/fs/node_xattr.go +++ b/internal/fs/node_xattr.go @@ -53,9 +53,8 @@ func handleXattrErr(err error) error { case *xattr.Error: // On Linux, xattr calls on files in an SMB/CIFS mount can return - // ENOATTR instead of ENOTSUP. - switch e.Err { - case syscall.ENOTSUP, xattr.ENOATTR: + // ENOATTR instead of ENOTSUP. BSD can return EOPNOTSUPP. + if e.Err == syscall.ENOTSUP || e.Err == syscall.EOPNOTSUPP || e.Err == xattr.ENOATTR { return nil } return errors.WithStack(e)