Browse Source

cat entry content

pull/2280/head
Chris Lu 3 years ago
parent
commit
6bab20d862
  1. 5
      weed/command/filer_cat.go
  2. 5
      weed/shell/command_fs_cat.go

5
weed/command/filer_cat.go

@ -108,6 +108,11 @@ func runFilerCat(cmd *Command, args []string) bool {
return err
}
if len(respLookupEntry.Entry.Content) > 0 {
_, err = writer.Write(respLookupEntry.Entry.Content)
return err
}
filerCat.filerClient = client
return filer.StreamContent(&filerCat, writer, respLookupEntry.Entry.Chunks, 0, math.MaxInt64)

5
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)
})

Loading…
Cancel
Save