fix(05): cloud API path param, root sentinel, webdav creds in list, upload path
cloud.py: list_connections now decrypts and surfaces server_url +
connection_username for nextcloud/webdav providers; folder route uses
{folder_id:path} to handle slashes; translates "root" sentinel to "".
nextcloud_backend.py: skip parent directory entry in PROPFIND Depth:1 results.
webdav_backend.py: add cloud_folder + original_filename params to
upload_object so files land in the user's chosen folder with their real name.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -93,11 +93,15 @@ class NextcloudBackend(WebDAVBackend):
|
||||
# client.list() returns a list of file/folder names in the directory
|
||||
items = await asyncio.to_thread(self._client.list, folder_path)
|
||||
|
||||
folder_norm = folder_path.strip("/")
|
||||
result: list[dict] = []
|
||||
for name in items:
|
||||
# Skip the "." self-reference that some WebDAV servers include
|
||||
# Skip the "." self-reference and empty entries
|
||||
if not name or name in (".", "./"):
|
||||
continue
|
||||
# Skip the directory itself (PROPFIND Depth:1 always includes the parent)
|
||||
if name.strip("/") == folder_norm:
|
||||
continue
|
||||
|
||||
# Construct the full path for info lookup
|
||||
if folder_path:
|
||||
|
||||
Reference in New Issue
Block a user