mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +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:
parent
99e4ccbd94
commit
7681a63fdb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user