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 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 15:59:27 +02:00
parent dac215840e
commit c0257f6068
@@ -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