aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_configure.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2021-07-12 13:47:42 +0800
committerGitHub <noreply@github.com>2021-07-12 13:47:42 +0800
commit272c7836c3a97c0ab8b31e335d7fa6efc769edc0 (patch)
treeb17792c1a77e0c2fdd07b371da64ca5a14a62f75 /weed/shell/command_fs_configure.go
parented57a55eaec2318bf21693582105660d7612118b (diff)
parentd013d6d9680296ba13c3f0da09f3bb3ae8550828 (diff)
downloadseaweedfs-272c7836c3a97c0ab8b31e335d7fa6efc769edc0.tar.xz
seaweedfs-272c7836c3a97c0ab8b31e335d7fa6efc769edc0.zip
Merge pull request #1 from chrislusf/master
Diffstat (limited to 'weed/shell/command_fs_configure.go')
-rw-r--r--weed/shell/command_fs_configure.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go
index 52fcae1c6..a7e601bec 100644
--- a/weed/shell/command_fs_configure.go
+++ b/weed/shell/command_fs_configure.go
@@ -120,7 +120,9 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
if *apply {
- if err := filer.SaveAs(commandEnv.option.FilerHost, int(commandEnv.option.FilerPort), filer.DirectoryEtcSeaweedFS, filer.FilerConfName, "text/plain; charset=utf-8", &buf); err != nil {
+ if err = commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
+ return filer.SaveInsideFiler(client, filer.DirectoryEtcSeaweedFS, filer.FilerConfName, buf.Bytes())
+ }); err != nil && err != filer_pb.ErrNotFound {
return err
}