fix: getPoolIdx decouple from top level options (#11512)

top-level options shouldn't be passed down for
GetObjectInfo() while verifying the objects in
different pools, this is to make sure that
we always get the value from the pool where
the object exists.
This commit is contained in:
Harshavardhana
2021-02-10 11:45:02 -08:00
committed by GitHub
parent 682482459d
commit cbf4bb62e0
3 changed files with 19 additions and 25 deletions

View File

@@ -460,6 +460,7 @@ func (er erasureObjects) getObjectInfo(ctx context.Context, bucket, object strin
// Make sure to return object info to provide extra information.
return objInfo, toObjectErr(errMethodNotAllowed, bucket, object)
}
if fi.Deleted {
if opts.VersionID == "" || opts.DeleteMarker {
return objInfo, toObjectErr(errFileNotFound, bucket, object)