Fix a potential infinite loop condition, that causes the script to consume all ram on the box and get oom-killed.

This commit is contained in:
garbled1 2024-02-16 09:11:49 -07:00
parent ea2bad5500
commit f76061e138

View file

@ -61,7 +61,10 @@ def create_symlinks(d):
else:
order.extend(data["pages"][work]["images"].values())
if "prev" in data["pages"][work]:
work = data["pages"][work]["prev"]
if data["pages"][work]["prev"] == work:
work = None
else:
work = data["pages"][work]["prev"]
else:
work = None
order.reverse()