mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 19:28:25 +02:00
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"
This commit is contained in:
parent
71229d2e2e
commit
922669fdaf
1 changed files with 2 additions and 2 deletions
|
@ -162,12 +162,12 @@ class ExtractedGame:
|
||||||
if output_type == wit.Extension.FST: return
|
if output_type == wit.Extension.FST: return
|
||||||
|
|
||||||
destination_file = self.path.with_suffix(self.path.suffix + output_type.value)
|
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
|
i: int = 0
|
||||||
while destination_file.exists():
|
while destination_file.exists():
|
||||||
i += 1
|
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(
|
converted_game: wit.WITPath = wit.copy(
|
||||||
source_directory=self.path,
|
source_directory=self.path,
|
||||||
|
|
Loading…
Reference in a new issue