fix directory lookup nil

This commit is contained in:
Chris Lu committed 2020-02-25 11:13:06 -08:00
1 parent e86da5a491
commit 7d10fdf737
8 files changed
+22 -8

No files matched your search

+3
View File
@@ -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)