From 52f68b2c7aa02846cbcfc73b441ebf51770c9b74 Mon Sep 17 00:00:00 2001 From: vg Date: Mon, 4 Mar 2024 22:11:23 +0100 Subject: git-sync on dita --- gamechestcli/gamechest/runners/extract.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gamechestcli') diff --git a/gamechestcli/gamechest/runners/extract.py b/gamechestcli/gamechest/runners/extract.py index 12f4d2f..1715bd6 100644 --- a/gamechestcli/gamechest/runners/extract.py +++ b/gamechestcli/gamechest/runners/extract.py @@ -33,14 +33,14 @@ class Extract(RunnerBase): ) lzip_command = '/usr/bin/lzip' plzip_command = '/usr/bin/plzip' - lzip_command_to_use = lzip_command - if os.path.exists(plzip_command): - lzip_command_to_use = plzip_command + uncompress_command_to_use = [lzip_command, '--decompress'] + if src.endswith('.tlz'): + if os.path.exists(plzip_command): + uncompress_command_to_use = [plzip_command, '--decompress'] + elif src.endswith('.tzst'): + uncompress_command_to_use = ['zstd', '-T0', '-d', '--stdout'] self.zip_proc = subprocess.Popen( - [ - lzip_command_to_use, - '--decompress', - ], + uncompress_command_to_use, stdin=self.pv_proc.stdout, stdout=subprocess.PIPE, **common_parameters, -- cgit v1.2.3