diff --git a/worthless/installer.py b/worthless/installer.py index 57c5cbf..a417f7e 100644 --- a/worthless/installer.py +++ b/worthless/installer.py @@ -413,8 +413,11 @@ class Installer: archive = Path(archive).resolve() if not archive.exists(): raise FileNotFoundError(f"'{archive}' not found") - print(f'-o"{str(self._gamedir)}"') - proc = await asyncio.create_subprocess_shell(f"7z x {str(archive)} -o'{str(self._gamedir)}'") + game_dir_str = str(self._gamedir) + if not game_dir_str.endswith("/"): + game_dir_str += "/" + print(f'-o"{game_dir_str}"') + proc = await asyncio.create_subprocess_shell(f'7z x {str(archive)} -o"{game_dir_str}"') await proc.wait() if proc.returncode != 0: raise RuntimeError("Extracting failed")