Skip to content

fix: move and copy into sub folders of received shares - #3466

Merged
AlexAndBear merged 1 commit into
mainfrom
fix/move-copy-share-subfolder
Sep 30, 2026
Merged

AlexAndBear merged 1 commit into
mainfrom
fix/move-copy-share-subfolder

Conversation

@AlexAndBear

Copy link
Copy Markdown
Member

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 via getMatchingSpace(). Inside a share space, the folder loader only attached the share space as remoteItemId to the children, not to the current folder. For sub folders the lookup therefore fell back to a share space with id = 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 the remoteItemId. Before #2599, paste took the target space from the current route, so the target never went through getMatchingSpace().

The folder loader now also sets remoteItemId on 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 spaceId instead of storageId) doesn't help here: for share sub folders, OpenCloud returns the owner's space as oc:spaceid, which equals the existing storageId. See #3374 (comment).

Related Issue

How Has This Been Tested?

  • test environment: local OpenCloud 8.0.0 rolling (docker-compose), Chrome
  • test case 1: user A shares f1 (with k2/j1/file.txt) with user B; user B moves file.txt from f1/k2/j1 into k2 via "Move to" → succeeds (before: "Moving files from one space to another is not possible", and "Copy here" failed with PROPFIND /dav/spaces/k2 and /dav/spaces/f1/k2 404)
  • test case 2: new unit tests for FolderLoaderSpace (remoteItemId set on current folder and children in share spaces, unset elsewhere)
  • test case 3: pnpm check:types, ESLint, Prettier

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear

Copy link
Copy Markdown
Member Author

@v-scharf do you mind to add e2e test for this? 🤗
@kulmann is this worth to be backported?

@v-scharf

Copy link
Copy Markdown
Contributor

@v-scharf do you mind to add e2e test for this?

Sure, I reproduced bug. I'll add test after merging your fix

@AlexAndBear
AlexAndBear merged commit a85d248 into main Sep 30, 2026
33 checks passed
@AlexAndBear
AlexAndBear deleted the fix/move-copy-share-subfolder branch September 30, 2026 07:37
@AlexAndBear

Copy link
Copy Markdown
Member Author

💚 All backports created successfully

Status Branch Result
✅ stable-7.1

Questions ?

Please refer to the Backport tool documentation

AlexAndBear added a commit that referenced this pull request Oct 1, 2026
AlexAndBear added a commit that referenced this pull request Oct 1, 2026
…3466) (#3508)

* fix: move and copy into sub folders of received shares (#3466)

(cherry picked from commit a85d248)

* test: adapt the loaderSpace test to the TaskContext of stable-7.1
@openclouders openclouders mentioned this pull request Oct 1, 2026
1 task
@v-scharf v-scharf added the backport-required Needs a backport to the current stable branch label Oct 6, 2026
@v-scharf v-scharf removed the backport-required Needs a backport to the current stable branch label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

fix: move/copy to share subfolder fails with PROPFIND 404 (regression from v4→v7)

3 participants