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 Michael Eischer committed 2025-09-06 22:03:12 +02:00
1 parent b75f80ae5f
commit 37851827c5
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)