fix: search empty results + extract error 408 (v0.3.2)
Bug 1 — search always returned empty results: Search::start was passing folder_path as a plain string. DSM silently ignores a plain string for this parameter and returns finished=True with files=[] immediately, as if nothing was found. Fix: json.dumps([path]) — JSON array, matching the multi-path API pattern used by DirSize::start and List::getinfo. Bug 2 — extract returned DSM error 408: Extract::start was using "file_path" as the parameter key for the source archive. DSM expects "path". Without a valid path DSM returned error 408. The json.dumps wrapping was already correct. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -463,7 +463,7 @@ async def test_search_success(config: AppConfig) -> None:
|
||||
start_call = client.request.call_args_list[0]
|
||||
assert start_call[0][0] == "SYNO.FileStation.Search"
|
||||
assert start_call[0][1] == "start"
|
||||
assert start_call[1]["params"]["folder_path"] == "/docker"
|
||||
assert json.loads(start_call[1]["params"]["folder_path"]) == ["/docker"]
|
||||
assert start_call[1]["params"]["pattern"] == "*.yaml"
|
||||
assert start_call[1]["params"]["recursive"] == "true"
|
||||
# Verify clean was called last
|
||||
@@ -1353,7 +1353,7 @@ async def test_extract_success(config: AppConfig) -> None:
|
||||
assert start_call[0][1] == "start"
|
||||
assert start_call[1]["version"] == 2
|
||||
p = start_call[1]["params"]
|
||||
assert json.loads(p["file_path"]) == "/backup/archive.zip"
|
||||
assert json.loads(p["path"]) == "/backup/archive.zip"
|
||||
assert json.loads(p["dest_folder_path"]) == "/data/extracted"
|
||||
assert p["overwrite"] == "false"
|
||||
assert p["keep_dir"] == "true"
|
||||
|
||||
Reference in New Issue
Block a user