From c0257f6068ce666ad2ee6926c2100643a6534f66 Mon Sep 17 00:00:00 2001 From: Marcus van Elst Date: Mon, 13 Apr 2026 15:59:27 +0200 Subject: [PATCH] Fix compose file probe: use FileStation.List/getinfo instead of FileStation.Info/get SYNO.FileStation.Info/get is a system-info API and returns success regardless of whether a path exists, so the probe always returned the first candidate (docker-compose.yml) even when only compose.yaml was present. SYNO.FileStation.List/getinfo returns {"files": [...]} with an empty list for non-existent paths, enabling correct detection. Co-Authored-By: Claude Sonnet 4.6 --- src/mcp_synology_container/modules/compose.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mcp_synology_container/modules/compose.py b/src/mcp_synology_container/modules/compose.py index 075ed4a..20f6896 100644 --- a/src/mcp_synology_container/modules/compose.py +++ b/src/mcp_synology_container/modules/compose.py @@ -329,13 +329,14 @@ async def _find_compose_path( for filename in _COMPOSE_FILENAMES: path = f"{base}/{filename}" try: - await client.request( - "SYNO.FileStation.Info", - "get", + data = await client.request( + "SYNO.FileStation.List", + "getinfo", params={"path": path, "additional": "[]"}, ) - logger.debug("Found compose file: %s", path) - return path + if data.get("files"): + logger.debug("Found compose file: %s", path) + return path except Exception: continue