Skip to content

Commit

Permalink
fix track collision renames to put the collision bumper before the fi…
Browse files Browse the repository at this point in the history
…le ext
  • Loading branch information
azuline committed Oct 27, 2023
1 parent db0072f commit 9c31fad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rose/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,9 @@ def _update_cache_for_releases_executor(
while True:
if virtual_filename not in seen_track_names:
break
virtual_filename = f"{original_virtual_filename} [{collision_no}]"
# Write the collision number before the file extension.
povf = Path(original_virtual_filename)
virtual_filename = f"{povf.stem} [{collision_no}]{povf.suffix}"
collision_no += 1
seen_track_names.add(virtual_filename)
if virtual_filename != t.virtual_filename:
Expand Down

0 comments on commit 9c31fad

Please sign in to comment.