aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_cat.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/command_fs_cat.go')
-rw-r--r--weed/shell/command_fs_cat.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/shell/command_fs_cat.go b/weed/shell/command_fs_cat.go
index 238dee7f9..06c8232c9 100644
--- a/weed/shell/command_fs_cat.go
+++ b/weed/shell/command_fs_cat.go
@@ -56,6 +56,9 @@ func (c *commandFsCat) Do(args []string, commandEnv *CommandEnv, writer io.Write
if err != nil {
return err
}
+ if respLookupEntry.Entry == nil {
+ return fmt.Errorf("file not found: %s", path)
+ }
return filer2.StreamContent(commandEnv.MasterClient, writer, respLookupEntry.Entry.Chunks, 0, math.MaxInt32)