fix(file-provider): use slash prefix for child item queries. - #10130
Conversation
|
/backport to stable-33.0 |
|
/backport to stable-4.0 |
431417c to
4773801
Compare
f81ce69 to
df9900d
Compare
df9900d to
160d816
Compare
19d238d to
590beb2
Compare
Appends "/" to directory URLs before prefix matching to prevent "A/B" from incorrectly matching children of "A/BC". Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: Camila Ayres <[email protected]>
Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: Camila Ayres <[email protected]>
590beb2 to
020b75d
Compare
|
Artifact containing the AppImage: nextcloud-appimage-pr-10130.zip Digest: 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. |
|
The backport to # Switch to the target branch and update it
git checkout stable-4.0
git pull origin stable-4.0
# Create the new backport branch
git checkout -b backport/10130/stable-4.0
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 32dcb4d6 020b75da
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/10130/stable-4.0Error: Failed to check for changes with origin/stable-4.0: No changes found in backport branch Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports. |
|



Resolves
Slash prefix in path queries — starts(with: directoryUrl) without a trailing slash incorrectly matched sibling directories that share a name prefix (e.g. photos matched photos-backup).
Summary
Renaming or deleting a folder could silently affect any sibling whose name begins with the same string — data in unrelated folders gets corrupted or deleted during sync.
Solution
Adding + "/" restricts matches to true descendants only.
Steps to test it
✅ FolderA-old and its contents must be untouched.
✅ FolderA-old must still appear and remain accessible.
Checklist
AI (if applicable)