mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
EOPNOTSUPP can be returned if the filesystem does not support xattrs (#5344)
--------- Co-authored-by: Greg Oster <oster@netbsd.org>
This commit is contained in:
7
changelog/unreleased/issue-5344
Normal file
7
changelog/unreleased/issue-5344
Normal file
@@ -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
|
||||||
@@ -53,9 +53,8 @@ func handleXattrErr(err error) error {
|
|||||||
|
|
||||||
case *xattr.Error:
|
case *xattr.Error:
|
||||||
// On Linux, xattr calls on files in an SMB/CIFS mount can return
|
// On Linux, xattr calls on files in an SMB/CIFS mount can return
|
||||||
// ENOATTR instead of ENOTSUP.
|
// ENOATTR instead of ENOTSUP. BSD can return EOPNOTSUPP.
|
||||||
switch e.Err {
|
if e.Err == syscall.ENOTSUP || e.Err == syscall.EOPNOTSUPP || e.Err == xattr.ENOATTR {
|
||||||
case syscall.ENOTSUP, xattr.ENOATTR:
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return errors.WithStack(e)
|
return errors.WithStack(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user