From 5851c26d43d7d331cb5f3fdc473ed735961c6b22 Mon Sep 17 00:00:00 2001 From: LengedZhao <867178694@qq.com> Date: Mon, 10 Aug 2026 15:56:36 +0800 Subject: [PATCH] fix: treat missing recorder ready directory as empty --- tg3_data_collection/data_get_sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tg3_data_collection/data_get_sync.py b/tg3_data_collection/data_get_sync.py index b889a33..ab7450b 100755 --- a/tg3_data_collection/data_get_sync.py +++ b/tg3_data_collection/data_get_sync.py @@ -183,7 +183,9 @@ class DataGetSync: def list_remote_episodes(self) -> list[str]: root = shlex.quote(self.remote_ready) output = self._remote_command( - f"find {root} -mindepth 1 -maxdepth 1 -type d -printf '%f\\n'" + f"if test -d {root}; then " + f"find {root} -mindepth 1 -maxdepth 1 -type d -printf '%f\\n'; " + "fi" ) names = sorted({line.strip() for line in output.splitlines() if line.strip()}) unsafe = [name for name in names if not safe_episode_name(name)]