Repository navigation
fix: move and copy into sub folders of received shares - #3466
Merged
Merged
Conversation
Member
Author
Contributor
Sure, I reproduced bug. I'll add test after merging your fix |
JammingBen
approved these changes
Sep 30, 2026
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
AlexAndBear
added a commit
that referenced
this pull request
Oct 1, 2026
(cherry picked from commit a85d248)
AlexAndBear
added a commit
that referenced
this pull request
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moving or copying resources into a sub folder of a received share fails with
PROPFIND /dav/spaces/<folder>404s. Moving into the share root works.Since move/copy use the location picker (#2599, web v7.1.4), the picked target folder (the picker's
currentFolder) is resolved viagetMatchingSpace(). Inside a share space, the folder loader only attached the share space asremoteItemIdto the children, not to the current folder. For sub folders the lookup therefore fell back to a share space withid = undefined, resulting in a/spaces/<folder>WebDAV path. The share root worked because its current folder is built from the Graph drive item, which carries theremoteItemId. Before #2599, paste took the target space from the current route, so the target never went throughgetMatchingSpace().The folder loader now also sets
remoteItemIdon the current folder in share spaces (unless it is already set, e.g. for the share root).The ownCloud fix linked in the issue (using
spaceIdinstead ofstorageId) doesn't help here: for share sub folders, OpenCloud returns the owner's space asoc:spaceid, which equals the existingstorageId. See #3374 (comment).Related Issue
How Has This Been Tested?
f1(withk2/j1/file.txt) with user B; user B movesfile.txtfromf1/k2/j1intok2via "Move to" → succeeds (before: "Moving files from one space to another is not possible", and "Copy here" failed withPROPFIND /dav/spaces/k2and/dav/spaces/f1/k2404)FolderLoaderSpace(remoteItemIdset on current folder and children in share spaces, unset elsewhere)pnpm check:types, ESLint, PrettierTypes of changes