mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-08-16 20:26:45 +00:00
weed/mount implements all four xattr operations and the filer stores the values, but the Windows adapter overrode none of them, so cgofuse's defaults answered every call with 'not implemented'. WinFsp advertises extended attribute support either way, because cgofuse registers the callbacks unconditionally, so applications were told the volume has them and then refused on every use. Attributes written from Linux were invisible from Windows. Untested in CI: exercising Windows extended attributes needs the native NtSetEaFile path rather than anything in os or PowerShell.
17 lines
530 B
Go
17 lines
530 B
Go
package mount
|
|
|
|
import "testing"
|
|
|
|
// The Windows adapter forwards cgofuse's xattr flags to SetXAttr untouched,
|
|
// which only holds while both sides number them the same. cgofuse's side is
|
|
// pinned in weed/mount/winfsp; this pins ours, so editing either alone fails
|
|
// rather than silently turning a create into a replace.
|
|
func TestXattrFlagValues(t *testing.T) {
|
|
if xattr_CREATE != 1 {
|
|
t.Errorf("xattr_CREATE = %d, want 1", xattr_CREATE)
|
|
}
|
|
if xattr_REPLACE != 2 {
|
|
t.Errorf("xattr_REPLACE = %d, want 2", xattr_REPLACE)
|
|
}
|
|
}
|