mirror of
https://github.com/versity/versitygw.git
synced 2026-01-06 19:56:27 +00:00
feat: check for xattr support on posix init
This commit is contained in:
@@ -74,6 +74,12 @@ func New(rootdir string) (*Posix, error) {
|
||||
return nil, fmt.Errorf("open %v: %w", rootdir, err)
|
||||
}
|
||||
|
||||
_, err = xattr.FGet(f, "user.test")
|
||||
if errors.Is(err, syscall.ENOTSUP) {
|
||||
f.Close()
|
||||
return nil, fmt.Errorf("xattr not supported on %v", rootdir)
|
||||
}
|
||||
|
||||
return &Posix{rootfd: f, rootdir: rootdir}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user