From 026aec8698aa316dbfd74953212024c73bc0994a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Mon, 1 Jun 2020 11:44:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20ske?= =?UTF-8?q?l=20=D0=B2=20=D1=88=D0=B8=D1=84=D1=80=D0=BE=D0=B2=D0=B0=D0=BD?= =?UTF-8?q?=D0=BD=D1=83=D1=8E=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/desktop/desktop.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/desktop/desktop.py b/pym/desktop/desktop.py index 2099749..7d963f3 100644 --- a/pym/desktop/desktop.py +++ b/pym/desktop/desktop.py @@ -123,10 +123,10 @@ class Desktop(MethodsInterface): # поместить данные во временный tarfile remove_files = [] tf = tempfile.TemporaryFile() - for fn in listDirectory(userDir, fullPath=False): - full_fn = path.join(userDir, fn) - if path.lexists(full_fn): - with tarfile.open(fileobj=tf, mode='w:') as tarf: + with tarfile.open(fileobj=tf, mode='w:') as tarf: + for fn in listDirectory(userDir, fullPath=False): + full_fn = path.join(userDir, fn) + if path.lexists(full_fn): tarf.add(full_fn, fn) remove_files.append(full_fn) tf.flush()