diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-02-25 11:13:06 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-02-25 11:13:06 -0800 |
| commit | 7d10fdf73720fb3234cd5cacfaf10fb79590d754 (patch) | |
| tree | 3c8d1170824d605bdb6532cf657b85824fd848dd /weed/shell/command_fs_meta_cat.go | |
| parent | e86da5a4918e0cf663a8c592387c72c850647e4e (diff) | |
| download | seaweedfs-7d10fdf73720fb3234cd5cacfaf10fb79590d754.tar.xz seaweedfs-7d10fdf73720fb3234cd5cacfaf10fb79590d754.zip | |
fix directory lookup nil
Diffstat (limited to 'weed/shell/command_fs_meta_cat.go')
| -rw-r--r-- | weed/shell/command_fs_meta_cat.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/shell/command_fs_meta_cat.go b/weed/shell/command_fs_meta_cat.go index 9980f67a2..ec9a495f2 100644 --- a/weed/shell/command_fs_meta_cat.go +++ b/weed/shell/command_fs_meta_cat.go @@ -55,6 +55,9 @@ func (c *commandFsMetaCat) Do(args []string, commandEnv *CommandEnv, writer io.W if err != nil { return err } + if respLookupEntry.Entry == nil { + return fmt.Errorf("file not found: %s", path) + } m := jsonpb.Marshaler{ EmitDefaults: true, |
