Skip to content

Commit

Permalink
Fix OverrideType rename semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Nov 7, 2023
1 parent 7aacf48 commit c62ec75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pykotor/tslpatcher/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def handle_override_type(self, patch: PatcherModifications):
new_filepath: CaseAwarePath = override_dir / ("old_" + patch.saveas)
i = 2
while new_filepath.exists(): # tslpatcher does not do this loop.
stem = new_filepath.stem if i == 2 else (new_filepath.stem[4:] + f" ({i})") # noqa: PLR2004
stem = new_filepath.stem if i == 2 else (new_filepath.stem[:-4] + f" ({i})") # noqa: PLR2004
new_filepath = (new_filepath.parent / stem).with_suffix(new_filepath.suffix)
i += 1
try:
Expand Down

0 comments on commit c62ec75

Please sign in to comment.