Skip to content

Commit

Permalink
Merge pull request #300 from garbled1/infinite_loop_bad
Browse files Browse the repository at this point in the history
Fix a potential infinite loop condition
  • Loading branch information
TobiX authored Feb 16, 2024
2 parents b495c51 + f76061e commit e2b3bea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/order-symlinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e2b3bea

Please sign in to comment.