From d47e1bac35408fb1f0e881f4220bb3cebb410e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8B=E3=81=BF=E3=81=AA=E3=83=BC=E5=85=88=E7=94=9F?= Date: Thu, 16 Jul 2026 20:17:04 +0900 Subject: [PATCH] =?UTF-8?q?=E7=94=BB=E5=83=8F=E3=83=87=E3=82=A3=E3=83=AC?= =?UTF-8?q?=E3=82=AF=E3=83=88=E3=83=AA=E5=80=99=E8=A3=9C=E3=81=AE=E3=82=B9?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=B3=E3=82=92=E5=88=B6=E9=99=90=E3=81=97?= =?UTF-8?q?=E3=80=81=E6=9C=80=E6=96=B0=E3=81=AE=E7=94=BB=E5=83=8F=E3=82=92?= =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=81=99=E3=82=8B=E3=83=AD=E3=82=B8=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=92=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- suite_nodes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/suite_nodes.py b/suite_nodes.py index 036f1ce..705f854 100644 --- a/suite_nodes.py +++ b/suite_nodes.py @@ -1441,8 +1441,12 @@ def _find_image_dir_candidates(relpath: str, search_directory=None, limit: int = mtime = 0.0 found.append((mtime, p)) if len(found) >= limit: - # Keep scanning bounded. Sort latest first below. - pass + # Bound the scan as well as the returned candidate list. + # The sort below selects the newest images from this bounded + # candidate set. + break + if len(found) >= limit: + break except Exception: logger.exception("ImageDirPreview scan failed: %s", root) found.sort(key=lambda item: item[0], reverse=True)