aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_configure.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2023-10-13 02:29:55 +0500
committerGitHub <noreply@github.com>2023-10-12 14:29:55 -0700
commit1cac5d983de408ced3c05a98a6745d1077e7c1e0 (patch)
tree68afa8db614baa2ef7296276b32c15fc52d74149 /weed/shell/command_fs_configure.go
parentedee91ef0eb7f7612ae961ac1d1ace2afbd92b87 (diff)
downloadseaweedfs-1cac5d983de408ced3c05a98a6745d1077e7c1e0.tar.xz
seaweedfs-1cac5d983de408ced3c05a98a6745d1077e7c1e0.zip
fix: disallow file name too long when writing a file (#4881)
* fix: disallow file name too long when writing a file * bool LongerName to MaxFilenameLength --------- Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
Diffstat (limited to 'weed/shell/command_fs_configure.go')
-rw-r--r--weed/shell/command_fs_configure.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go
index d8a160e26..d775a318a 100644
--- a/weed/shell/command_fs_configure.go
+++ b/weed/shell/command_fs_configure.go
@@ -56,6 +56,7 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
diskType := fsConfigureCommand.String("disk", "", "[hdd|ssd|<tag>] hard drive or solid state drive or any tag")
fsync := fsConfigureCommand.Bool("fsync", false, "fsync for the writes")
isReadOnly := fsConfigureCommand.Bool("readOnly", false, "disable writes")
+ maxFileNameLength := fsConfigureCommand.Uint("maxFileNameLength", 0, "file name length limits in bytes for compatibility with Unix-based systems")
dataCenter := fsConfigureCommand.String("dataCenter", "", "assign writes to this dataCenter")
rack := fsConfigureCommand.String("rack", "", "assign writes to this rack")
dataNode := fsConfigureCommand.String("dataNode", "", "assign writes to this dataNode")
@@ -79,6 +80,7 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
Replication: *replication,
Ttl: *ttl,
Fsync: *fsync,
+ MaxFileNameLength: uint32(*maxFileNameLength),
DiskType: *diskType,
VolumeGrowthCount: uint32(*volumeGrowthCount),
ReadOnly: *isReadOnly,