From 4c72482536292a4ec1db3a1f7778240bfde846ad Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 6 Dec 2020 19:43:31 -0800 Subject: [PATCH] shell: fix fs.configure --- weed/shell/command_fs_configure.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go index d530b2585..1600fddec 100644 --- a/weed/shell/command_fs_configure.go +++ b/weed/shell/command_fs_configure.go @@ -77,13 +77,15 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io return filer.StreamContent(commandEnv.MasterClient, &buf, respLookupEntry.Entry.Chunks, 0, math.MaxInt64) - }); err != nil { + }); err != nil && err != filer_pb.ErrNotFound { return err } fc := filer.NewFilerConf() - if err = fc.LoadFromBytes(buf.Bytes()); err != nil { - return err + if buf.Len() > 0 { + if err = fc.LoadFromBytes(buf.Bytes()); err != nil { + return err + } } if *locationPrefix != "" {