renpy / renpy-build

Build system for the Ren'Py visual novel engine. (The engine itself, not games.)
76 stars 51 forks source link

rapt: Prevent clobbering shadowed "x-*" assets #47

Closed mal closed 2 years ago

mal commented 2 years ago

In a scenario where foo and x-foo both exist, it was previously possible for foo to be moved to x-foo before x-foo had been moved to x-x-foo, with the result that the original x-foo went missing having been overwritten.

By reverse sorting base names by length, we ensure that x-foo will always be renamed before foo, avoiding the potential for overwriting such shadowed assets.

Fixes: https://github.com/renpy/renpy/issues/3902

renpytom commented 2 years ago

Merged, thanks.