diff options
| author | chrislu <chris.lu@gmail.com> | 2022-02-13 01:34:19 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-02-13 01:34:19 -0800 |
| commit | e85ca10a1a426e9808024f65dd0921b241296796 (patch) | |
| tree | 7b325c4dcb830538e7dfa00048121bf07ccf4b6a /weed/mount/wfs_save.go | |
| parent | 21046c6a287e68b07ef21702ded90abe29a3412a (diff) | |
| download | seaweedfs-e85ca10a1a426e9808024f65dd0921b241296796.tar.xz seaweedfs-e85ca10a1a426e9808024f65dd0921b241296796.zip | |
add mkdir
Diffstat (limited to 'weed/mount/wfs_save.go')
| -rw-r--r-- | weed/mount/wfs_save.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/mount/wfs_save.go b/weed/mount/wfs_save.go index 240c010d8..0cac30453 100644 --- a/weed/mount/wfs_save.go +++ b/weed/mount/wfs_save.go @@ -8,6 +8,7 @@ import ( "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/util" "github.com/hanwen/go-fuse/v2/fuse" + "syscall" ) func (wfs *WFS) saveEntry(path util.FullPath, entry *filer_pb.Entry) (code fuse.Status) { @@ -57,3 +58,10 @@ func (wfs *WFS) mapPbIdFromLocalToFiler(entry *filer_pb.Entry) { } entry.Attributes.Uid, entry.Attributes.Gid = wfs.option.UidGidMapper.LocalToFiler(entry.Attributes.Uid, entry.Attributes.Gid) } + +func checkName(name string) fuse.Status { + if len(name) >= 256 { + return fuse.Status(syscall.ENAMETOOLONG) + } + return fuse.OK +} |
