From f4c7541b1f1c99726d8c06e318ed53282266f1e6 Mon Sep 17 00:00:00 2001 From: 13339479676 Date: Thu, 20 Jan 2022 09:24:51 +0800 Subject: [PATCH] compress update --- utils/compress.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/compress.py b/utils/compress.py index 4a27cde..31d391f 100644 --- a/utils/compress.py +++ b/utils/compress.py @@ -32,13 +32,17 @@ def webcam_compress(compressStyle, is_autoCompressName, compressName, preCompres # zip压缩 compress_file = zipfile.ZipFile(compressName, compressMode) for i in range(len(file_list)): + compressing_file = f'{preCompressFilePath}/{file_list[i]}' + # print(f'正在压缩:{compressing_file}') compress_file.write( - f'{preCompressFilePath}/{file_list[i]}', compress_type=zipfile.ZIP_DEFLATED) + compressing_file, compress_type=zipfile.ZIP_DEFLATED) if (compressStyle == COMPRESS_SUFFIX[1]): # tar压缩 compress_file = tarfile.open(compressName, compressMode) for i in range(len(file_list)): - compress_file.add(f'{preCompressFilePath}/{file_list[i]}') + compressing_file = f'{preCompressFilePath}/{file_list[i]}' + # print(f'正在压缩:{compressing_file}') + compress_file.add(compressing_file) # ----------压缩结束---------- compress_file.close()