When the tarball is too heavy, don't display its content
This avoid an infinite wait due to a full buffer
This commit is contained in:
parent
5d5c9d3e7c
commit
eff10e0cda
@ -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"]:
|
||||
|
Reference in New Issue
Block a user