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:
gregosterandGreg Oster authored and GitHub committed 2025-09-05 19:09:27 +00:00
1 parent e98c44baaf
commit 839c38b4c4
2 files changed
+9 -3

No files matched your search

+2 -3
View File
@@ -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)