diff options
Diffstat (limited to 'weed/filesys/xattr.go')
| -rw-r--r-- | weed/filesys/xattr.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/filesys/xattr.go b/weed/filesys/xattr.go index 6021fd8ec..818652f64 100644 --- a/weed/filesys/xattr.go +++ b/weed/filesys/xattr.go @@ -3,6 +3,7 @@ package filesys import ( "context" "strings" + "syscall" "github.com/seaweedfs/fuse" @@ -143,3 +144,10 @@ func (wfs *WFS) maybeLoadEntry(dir, name string) (entry *filer_pb.Entry, err err } return cachedEntry.ToProtoEntry(), cacheErr } + +func checkName(name string) error { + if len(name) >= 256 { + return syscall.ENAMETOOLONG + } + return nil +} |
