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:
@@ -329,11 +329,12 @@ 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": "[]"},
|
||||
)
|
||||
if data.get("files"):
|
||||
logger.debug("Found compose file: %s", path)
|
||||
return path
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user