From fc78b3a6a442401077a3d320045ffe53e6c4325b Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 17 Oct 2020 19:21:48 +0200 Subject: [PATCH] possibile fix esportazione videoteca su android --- platformcode/backup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformcode/backup.py b/platformcode/backup.py index baf4eea2..e9596559 100644 --- a/platformcode/backup.py +++ b/platformcode/backup.py @@ -101,7 +101,7 @@ def zip(dir, file): temp = file file = filetools.join(temp_path, os.path.split(file)[-1]) smb = True - with ZipFile(file, "w") as zf: + with ZipFile(filetools.file_open(file, 'wb', vfs=False), "w") as zf: abs_src = os.path.abspath(dir) for dirname, subdirs, files in os.walk(dir): for filename in files: @@ -118,5 +118,5 @@ def unzip(dir, file): filetools.copy(file, temp) file = temp - with ZipFile(file, 'r') as zf: - zf.extractall(dir) \ No newline at end of file + with ZipFile(filetools.file_open(file, 'rb', vfs=False), 'r') as zf: + zf.extractall(dir)