diff options
| author | hilimd <68371223+hilimd@users.noreply.github.com> | 2021-09-13 10:34:33 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-13 10:34:33 +0800 |
| commit | 1de733fda507e1da94b2e4741c74ba7e5e2c5f76 (patch) | |
| tree | aed7ac29e27e0f8def942154603375396fae9489 /weed/shell/command_fs_cat.go | |
| parent | 27c05f8c0b5c7bda43babeb61d79684d11851111 (diff) | |
| parent | 7591336a2269c1ad92266280634bcaea34f7a5d1 (diff) | |
| download | seaweedfs-1de733fda507e1da94b2e4741c74ba7e5e2c5f76.tar.xz seaweedfs-1de733fda507e1da94b2e4741c74ba7e5e2c5f76.zip | |
Merge pull request #81 from chrislusf/master
sync
Diffstat (limited to 'weed/shell/command_fs_cat.go')
| -rw-r--r-- | weed/shell/command_fs_cat.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/shell/command_fs_cat.go b/weed/shell/command_fs_cat.go index 3c5e13663..a5731240d 100644 --- a/weed/shell/command_fs_cat.go +++ b/weed/shell/command_fs_cat.go @@ -52,6 +52,11 @@ func (c *commandFsCat) Do(args []string, commandEnv *CommandEnv, writer io.Write return err } + if len(respLookupEntry.Entry.Content) > 0 { + _, err = writer.Write(respLookupEntry.Entry.Content) + return err + } + return filer.StreamContent(commandEnv.MasterClient, writer, respLookupEntry.Entry.Chunks, 0, math.MaxInt64) }) |
