From eff10e0cda4c95919cedb5cde8f1e76c1e4d0a58 Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mercier Date: Wed, 27 Apr 2022 12:09:00 +0200 Subject: [PATCH] When the tarball is too heavy, don't display its content This avoid an infinite wait due to a full buffer --- archive.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/archive.py b/archive.py index 7a34639..4da2251 100644 --- a/archive.py +++ b/archive.py @@ -104,10 +104,12 @@ def extract(cnt, dest=None): with tempfile.TemporaryDirectory() as temp: cmdline = ["tar", "--no-same-owner", "--no-same-permissions"] if dest is not None: - cmdline.append("-xvC") + cmdline.append("-xC") cmdline.append(temp) else: cmdline.append("-t") + if len(data) < 3145728: + cmdline.append("-v") if type in ["application/gzip", "application/x-gzip"]: cmdline.append("-z") elif type in ["application/xz", "application/x-xz"]: