mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Fix issue with backup compression
This commit is contained in:
parent
c037f1d1af
commit
41147266ad
@ -4,7 +4,7 @@ import logging
|
|||||||
import pathlib
|
import pathlib
|
||||||
import tempfile
|
import tempfile
|
||||||
import zipfile
|
import zipfile
|
||||||
from zipfile import ZipFile, ZIP_DEFLATED
|
from zipfile import ZipFile, ZIP_DEFLATED, ZIP_STORED
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import ssl
|
import ssl
|
||||||
import time
|
import time
|
||||||
@ -254,7 +254,7 @@ class FileHelpers:
|
|||||||
results,
|
results,
|
||||||
)
|
)
|
||||||
# Set the compression mode based on the `compressed` parameter
|
# Set the compression mode based on the `compressed` parameter
|
||||||
compression_mode = ZIP_DEFLATED if compressed else None
|
compression_mode = ZIP_DEFLATED if compressed else ZIP_STORED
|
||||||
with ZipFile(path_to_destination, "w", compression_mode) as zip_file:
|
with ZipFile(path_to_destination, "w", compression_mode) as zip_file:
|
||||||
zip_file.comment = bytes(
|
zip_file.comment = bytes(
|
||||||
comment, "utf-8"
|
comment, "utf-8"
|
||||||
|
Loading…
Reference in New Issue
Block a user