aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_cat.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-08-24 02:38:32 -0700
committerChris Lu <chris.lu@gmail.com>2021-08-24 02:38:32 -0700
commit6bab20d862cd2960dd4272cb7d6aa6abf8d6f097 (patch)
tree98635356e7a3bc37dafe9b36900e9f0139c0d2e8 /weed/shell/command_fs_cat.go
parente9ebe24f2e0f8b30284ea9334d5924f54e970c95 (diff)
downloadseaweedfs-6bab20d862cd2960dd4272cb7d6aa6abf8d6f097.tar.xz
seaweedfs-6bab20d862cd2960dd4272cb7d6aa6abf8d6f097.zip
cat entry content
Diffstat (limited to 'weed/shell/command_fs_cat.go')
-rw-r--r--weed/shell/command_fs_cat.go5
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)
})