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.
This commit is contained in:
Anis Elleuch
2021-01-25 18:53:37 +01:00
committed by GitHub
parent 09bc49bd51
commit bd8020aba8

View File

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