aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/wfs_save.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-02-13 01:34:19 -0800
committerchrislu <chris.lu@gmail.com>2022-02-13 01:34:19 -0800
commite85ca10a1a426e9808024f65dd0921b241296796 (patch)
tree7b325c4dcb830538e7dfa00048121bf07ccf4b6a /weed/mount/wfs_save.go
parent21046c6a287e68b07ef21702ded90abe29a3412a (diff)
downloadseaweedfs-e85ca10a1a426e9808024f65dd0921b241296796.tar.xz
seaweedfs-e85ca10a1a426e9808024f65dd0921b241296796.zip
add mkdir
Diffstat (limited to 'weed/mount/wfs_save.go')
-rw-r--r--weed/mount/wfs_save.go8
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
+}