fix: make listing consistent with top level delete marker (#3587)

```
~ mc ls s3/tbucket13/x.txt
[2021-01-25 13:24:09 PST]   525B z.txt
```

```
~ mc ls s3/tbucket132/x.txt
[2021-01-25 13:31:41 PST]   525B x.txt/z.txt
```
This commit is contained in:
Harshavardhana
2021-01-25 14:39:16 -08:00
committed by GitHub
parent 130f4393bb
commit 24ebcf13cf
+2 -1
View File
@@ -1408,8 +1408,9 @@ func (c *S3Client) Stat(ctx context.Context, opts StatOptions) (*ClientContent,
if err == nil {
return ctnt, nil
}
// Ignore object missing error but return for other errors
if !errors.As(err.ToGoError(), &ObjectMissing{}) {
if !errors.As(err.ToGoError(), &ObjectMissing{}) && !errors.As(err.ToGoError(), &ObjectIsDeleteMarker{}) {
return nil, err
}
}