Skip to content

Commit

Permalink
fix 发现已生成的0张截图,跳过截图...
Browse files Browse the repository at this point in the history
LeiShi1313 committed Dec 2, 2021
1 parent 9ac267c commit dbaac55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion differential/plugins/base.py
Original file line number Diff line number Diff line change
@@ -310,7 +310,7 @@ def _make_screenshots(self) -> Optional[str]:
# 查找已有的截图
for f in Path(tempfile.gettempdir()).glob("Differential*"):
if f.is_dir() and self.folder.name in f.name:
if len(list(f.glob("*.png"))) == self.screenshot_count:
if self.screenshot_count > 0 and len(list(f.glob("*.png"))) == self.screenshot_count:
temp_dir = f.absolute()
logger.info("发现已生成的{}张截图,跳过截图...".format(self.screenshot_count))
break

0 comments on commit dbaac55

Please sign in to comment.