2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 12:55:18 +00:00

restic: Cleanup xattr error handling for Solaris

Since xattr 0.4.8 (https://github.com/pkg/xattr/pull/68) returns ENOTSUP
similar to Linux.
This commit is contained in:
Michael Eischer 2022-08-21 10:47:05 +02:00
parent 99e4ccbd94
commit 7681a63fdb

View File

@ -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)