From 922669fdaf3a305f59b4a85d8548d40b4facde7a Mon Sep 17 00:00:00 2001 From: Faraphel Date: Sat, 13 Aug 2022 22:49:04 +0200 Subject: [PATCH] Fixed an issue where in case of name conflict, the compressed game would add a number suffix after the extension "MKWF v0.12.wbfs (1)" instead of "MKWF v0.12 (1).wbfs" --- source/mkw/ExtractedGame.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/mkw/ExtractedGame.py b/source/mkw/ExtractedGame.py index fc5071e..7ba5b1b 100644 --- a/source/mkw/ExtractedGame.py +++ b/source/mkw/ExtractedGame.py @@ -162,12 +162,12 @@ class ExtractedGame: if output_type == wit.Extension.FST: return destination_file = self.path.with_suffix(self.path.suffix + output_type.value) - dest_name: str = destination_file.name + dest_stem: str = destination_file.stem i: int = 0 while destination_file.exists(): i += 1 - destination_file = destination_file.with_name(dest_name + f" ({i})") + destination_file = destination_file.with_stem(dest_stem + f" ({i})") converted_game: wit.WITPath = wit.copy( source_directory=self.path,