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:
@@ -358,7 +358,7 @@ def register_filestation(
|
||||
"SYNO.FileStation.Search",
|
||||
"start",
|
||||
params={
|
||||
"folder_path": path,
|
||||
"folder_path": json.dumps([path]),
|
||||
"recursive": "true" if recursive else "false",
|
||||
"pattern": pattern,
|
||||
},
|
||||
@@ -845,7 +845,7 @@ def register_filestation(
|
||||
"start",
|
||||
version=2,
|
||||
params={
|
||||
"file_path": json.dumps(file_path),
|
||||
"path": json.dumps(file_path),
|
||||
"dest_folder_path": json.dumps(dest_folder_path),
|
||||
"overwrite": "true" if overwrite else "false",
|
||||
"keep_dir": "true" if keep_dir else "false",
|
||||
|
||||
Reference in New Issue
Block a user