Skip to content

Handle remote paths with special characters correctly#9341

Merged
i2h3 merged 1 commit intomasterfrom
i2h3/fix/9689031-question-mark-paths
Jan 21, 2026
Merged

Handle remote paths with special characters correctly#9341
i2h3 merged 1 commit intomasterfrom
i2h3/fix/9689031-question-mark-paths

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Jan 20, 2026

If files or folders contain characters with special treatment in URLs (such as ?, # or %), it may sabotage the metadata lookup because the paths were not parsed correctly yet.

@i2h3 i2h3 added this to the 4.1.0 milestone Jan 20, 2026
@i2h3 i2h3 self-assigned this Jan 20, 2026
@i2h3 i2h3 requested a review from Aiiaiiio as a code owner January 20, 2026 15:01
Copilot AI review requested due to automatic review settings January 20, 2026 15:01
@i2h3 i2h3 requested a review from nilsding as a code owner January 20, 2026 15:01
@i2h3 i2h3 added bug feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. labels Jan 20, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Jan 20, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Jan 20, 2026
@i2h3
Copy link
Collaborator Author

i2h3 commented Jan 20, 2026

/backport to stable-4.0

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request aims to fix the handling of remote file paths that contain special characters (particularly # and ?) which are normally treated as URL delimiters. The implementation attempts to parse these characters as literal parts of file/directory names rather than as URL fragments or query parameters.

Changes:

  • Modified the URL parsing logic in FilesDatabaseManager.itemMetadata(account:locatedAtRemoteUrl:) to extract paths from raw URL strings
  • Added test cases for paths containing hashtags and question marks in directory names

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
FilesDatabaseManager.swift Refactored URL parsing to treat special characters (#, ?) as literal characters in paths rather than URL delimiters
FilesDatabaseManagerTests.swift Added tests for finding items in directories with hashtags and question marks in their names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@i2h3 i2h3 force-pushed the i2h3/fix/9689031-question-mark-paths branch from 97cefee to 892e232 Compare January 21, 2026 09:31
@i2h3 i2h3 enabled auto-merge January 21, 2026 10:16
…ctly.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@mgallien mgallien force-pushed the i2h3/fix/9689031-question-mark-paths branch from 892e232 to a69582c Compare January 21, 2026 21:35
@github-actions
Copy link

Artifact containing the AppImage: nextcloud-appimage-pr-9341.zip

Digest: sha256:088d32f8a3b5a07c7182e7448bb4508280b60e185ecc0e6b4fc528e3288ff43b

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@i2h3 i2h3 merged commit 168ffd8 into master Jan 21, 2026
22 checks passed
@i2h3 i2h3 deleted the i2h3/fix/9689031-question-mark-paths branch January 21, 2026 22:12
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Jan 21, 2026
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-request bug feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system.

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants

Comments