hack: workaround over Windows path
This commit is contained in:
parent
1830081cb0
commit
cd2aabea60
@ -413,8 +413,11 @@ class Installer:
|
|||||||
archive = Path(archive).resolve()
|
archive = Path(archive).resolve()
|
||||||
if not archive.exists():
|
if not archive.exists():
|
||||||
raise FileNotFoundError(f"'{archive}' not found")
|
raise FileNotFoundError(f"'{archive}' not found")
|
||||||
print(f'-o"{str(self._gamedir)}"')
|
game_dir_str = str(self._gamedir)
|
||||||
proc = await asyncio.create_subprocess_shell(f"7z x {str(archive)} -o'{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()
|
await proc.wait()
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
raise RuntimeError("Extracting failed")
|
raise RuntimeError("Extracting failed")
|
||||||
|
Loading…
Reference in New Issue
Block a user