heal: Decode object name in healing result (#11348)

The user can see __XLDIR__ prefix in mc admin heal when the command
heals an empty object with a trailing slash. This commit decodes the
name of the object before sending it back to the upper level.
master
Anis Elleuch 4 years ago committed by GitHub
parent 09bc49bd51
commit bd8020aba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      cmd/erasure-server-pool.go

@ -1404,6 +1404,7 @@ func (z *erasureServerPools) HealObject(ctx context.Context, bucket, object, ver
for _, pool := range z.serverPools { for _, pool := range z.serverPools {
result, err := pool.HealObject(ctx, bucket, object, versionID, opts) result, err := pool.HealObject(ctx, bucket, object, versionID, opts)
result.Object = decodeDirObject(result.Object)
if err != nil { if err != nil {
if isErrObjectNotFound(err) || isErrVersionNotFound(err) { if isErrObjectNotFound(err) || isErrVersionNotFound(err) {
continue continue

Loading…
Cancel
Save