v04 zip update 02
This commit is contained in:
parent
9c40a41443
commit
3f932dc786
|
@ -20,7 +20,8 @@ def is_zipFile(zipName):
|
|||
# zip压缩
|
||||
def webcam_zip(is_autoZipName, zipName, preZipFilePath):
|
||||
if (is_autoZipName):
|
||||
zipName = str(preZipFilePath).split('/')[-1] + '.zip'
|
||||
zipNameTmp = str(preZipFilePath).split('/')[-1]
|
||||
zipName = f'{ROOT_PATH}/{zipNameTmp}.zip'
|
||||
else:
|
||||
is_zipFile(zipName)
|
||||
zip_file = zipfile.ZipFile(zipName, 'a')
|
||||
|
@ -32,4 +33,4 @@ def webcam_zip(is_autoZipName, zipName, preZipFilePath):
|
|||
compress_type=zipfile.ZIP_DEFLATED) # 压缩单个文件
|
||||
# ----------压缩结束----------
|
||||
zip_file.close()
|
||||
print(f'压缩成功!')
|
||||
print(f'压缩成功!保存在{zipName}')
|
||||
|
|
Loading…
Reference in New Issue