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)]