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)