Skip to content

fix(api): skip the space root when the server unescapes its href - #330

Merged
gnacho merged 1 commit into
mainfrom
fix/space-root-href
Nov 8, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/space-root-href

Conversation

@gnacho

@gnacho gnacho commented Nov 8, 2026

Copy link
Copy Markdown
Owner

The remote folder picker introduced in 0.44.8 reads the chosen space and filters its root by comparing entry.href_path with the request path. OpenCloud echoes the href unescaped (...$...!...) while the request carried %24/%21, so the comparison failed and the root became a folder named after the space id.

Reproduced against OpenCloud 8.1 with a real account:

  • before: folders[Ana Xu] = ["/7d443b01-...$4767cb24-..."], folders[2026] = [..., "/a0ca6a90-...!7d443b01-..."]
  • after: folders[Ana Xu] = [], folders[2026] = ["/2026 Bender", "/2026 Domatix", "/2026 Odooers", "/Fras Ptes", "/IRPF"]

Both sides are percent-decoded and the trailing slash dropped before the comparison, which also covers a Nextcloud login escaped as %40 in the URL.

Test added (red before the change, green after): space_folders_skip_the_root_although_the_server_unescapes_the_href. Gates: 784 tests (0 failed, 3 ignored), cargo clippy --all-targets -- -D warnings, cargo fmt --check.

Closes #329

OpenCloud echoes the requested collection unescaped while the request URL
percent-encodes the space id, so the root was listed as a folder named after
the id. Compare decoded hrefs before skipping it.
@gnacho
gnacho merged commit e34469f into main Nov 8, 2026
2 checks passed
@gnacho
gnacho deleted the fix/space-root-href branch November 8, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenCloud: the remote folder list offers the space id as a folder

1 participant