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 authored and GitHub committed 2021-01-25 09:53:37 -08:00
1 parent 09bc49bd51
commit bd8020aba8
1 file changed
+1
+1
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