From 0295dd62887c270737ac55083dbff62a085c25e5 Mon Sep 17 00:00:00 2001 From: Hayden <48267247+hayden-fr@users.noreply.github.com> Date: Fri, 5 Sep 2025 16:51:54 +0800 Subject: [PATCH] fix: Validate existence of entry path after improvements previews (#205) --- py/manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/py/manager.py b/py/manager.py index 4b8b118..49cbc4e 100644 --- a/py/manager.py +++ b/py/manager.py @@ -157,6 +157,8 @@ class ModelManager: def get_all_files_entry(directory: str): entries: list[os.DirEntry[str]] = [] + if not os.path.exists(directory): + return [] with os.scandir(directory) as it: for entry in it: if not include_hidden_files and entry.name.startswith("."):