Hi and welcome here
I think i understood the problem you are discussing here, found something similar when looking at TIM rebuilder code years ago.
The problem starts when a known set/rom is find and must be renamed, however using its "expected" name there is already other setfile that may also be incorrectly renamed.
Crashdisk is a simple example of this, imagining 2 single rom sets (so, 1 rom inside each):
"After the War (1989)(Dinamic).zip\After the War (1989)(Dinamic).adf" crc: AAAAAAAA, expected: BBBBBBBB
"After the War (1989)(Dinamic)[a].zip\After the War (1989)(Dinamic)[a].adf" crc: BBBBBBBB, expected: AAAAAAAAThis creates some kind of circular renaming problem, when the first case is found, if it is simply renamed to the right place the 2nd set will be eventually lost.
Is this the problem you've been talking about? If i've understood correctly romcenter now uses a different approach, any setfiles that have a name found in the current datfile are not touched, instead of that only romfiles are renamed or moved across sets. Am i right?
Although that may solve some cases where renaming set one would overwrite set two, it also has some problems and drawbacks. Apart from MAME and a few others, many times you will have single rom sets where the setname is similar to romname (except extension), in that case you might end up loosing files again if you copy:
"After the War (1989)(Dinamic).zip\After the War (1989)(Dinamic).adf" crc: AAAAAAAA
to
"After the War (1989)(Dinamic)[a].zip\After the War (1989)(Dinamic)[a].adf" crc: AAAAAAAA... in this case, loosing file crc BBBBBBBB
Anyway this problem can be also avoided, my main concern with this problem and possible workarounds is the performance hit you will take, in this situation you will have to unzip / rezip two files in both sets, while a simple rename might have solve it. No?
I'm not criticizing, just curious on how you solved that and if it is the better solution available. If i can help with something feel free to ask