fix: resolve concurrent read/write issues in WrapObjName (#7865)

This commit is contained in:
foxxorcat
2025-01-27 20:06:18 +08:00
committed by GitHub
parent c2633dd443
commit bdcf450203
2 changed files with 2 additions and 5 deletions

View File

@ -115,12 +115,12 @@ func ExtractFolder(objs []Obj, extractFolder string) {
}
func WrapObjName(objs Obj) Obj {
return &ObjWrapName{Obj: objs}
return &ObjWrapName{Name: utils.MappingName(objs.GetName()), Obj: objs}
}
func WrapObjsName(objs []Obj) {
for i := 0; i < len(objs); i++ {
objs[i] = &ObjWrapName{Obj: objs[i]}
objs[i] = &ObjWrapName{Name: utils.MappingName(objs[i].GetName()), Obj: objs[i]}
}
}