mirror of
https://github.com/restic/restic.git
synced 2025-12-01 20:51:52 +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:
committed by
Michael Eischer
parent
b75f80ae5f
commit
37851827c5
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:
|
||||
// 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)
|
||||
|
||||
Reference in New Issue
Block a user