Skip to content

Commit

Permalink
filemanager: zip: fix slow compressing speed
Browse files Browse the repository at this point in the history
Signed-off-by: Bian <[email protected]>
  • Loading branch information
BianSepang committed Dec 8, 2021
1 parent cca109d commit 761d772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions userbot/modules/filemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from os.path import basename, dirname, exists, isdir, isfile, join, relpath, splitext
from shutil import rmtree
from tarfile import TarFile, is_tarfile
from zipfile import ZIP_DEFLATED, BadZipFile, ZipFile, is_zipfile
from zipfile import BadZipFile, ZipFile, is_zipfile

from natsort import os_sorted
from py7zr import Bad7zFile, SevenZipFile, is_7zfile
Expand Down Expand Up @@ -177,7 +177,7 @@ async def zip_file(event):
zip_path = join(TEMP_DOWNLOAD_DIRECTORY, zip_name)
if not zip_name.endswith(".zip"):
zip_path += ".zip"
with ZipFile(zip_path, "w", ZIP_DEFLATED) as zip_obj:
with ZipFile(zip_path, "w") as zip_obj:
for roots, _, files in os.walk(path):
for file in files:
files_path = join(roots, file)
Expand Down

0 comments on commit 761d772

Please sign in to comment.