fix zip save

This commit is contained in:
13339479676 2022-01-19 15:57:20 +08:00
parent 88c953cf18
commit 98394ab03d
2 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ def webcam_opencv(device_index="0",
log_management(f'{outTimeMsg}\n', logName, logMode) # 记录用时
# ------------------压缩文件------------------
if (is_compress):
if (is_compress and (is_autoSaveFrame or is_handSaveFrame)):
# 自定义压缩文件名称
webcam_zip(is_autoZipName, f'{ROOT_PATH}/{zipName}', frame_savePath, zipMode)

View File

@ -11,7 +11,7 @@ ROOT_PATH = sys.path[0] # 项目根目录
# 判断zip文件名称
def is_zipFile(zipName):
zipNameSuffix = zipName.split('.')[-1]
zipNameSuffix = zipName.split('.')[-1] # zip文件后缀
if zipNameSuffix != "zip":
print(f'{zipName}:格式不正确!程序退出!')
sys.exit()