Skip to content

fix(dav): allow moving files between subfolders of the same share - #64106

Open
Antreesy wants to merge 2 commits into
masterfrom
fix/56727/team-folders-share-move
Open

fix(dav): allow moving files between subfolders of the same share#64106
Antreesy wants to merge 2 commits into
masterfrom
fix/56727/team-folders-share-move

Conversation

@Antreesy

@Antreesy Antreesy commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Group folder storage doesn't implement ISharedStorage, so moves within the same team folder nested structures were rejected as cross-share moves, even if it would be the same structure as in equivalent user folders tree.
  • Compare the source's and target's enclosing shares directly instead.
  • Add unit tests coverage in SharesPluginTest.php

TODO

  • Scenarios confirmation
  • Code+Test sanity check

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

- group folder storage doesn't implement ISharedStorage, so moves within the same team folder were rejected as cross-share moves. Compare the source's and target's enclosing shares directly instead.
- add unit tests coverage in SharesPluginTest.php

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy added this to the Nextcloud 36 milestone Sep 7, 2026
@Antreesy
Antreesy requested a review from susnux September 7, 2026 15:27
@Antreesy Antreesy self-assigned this Sep 7, 2026
@Antreesy
Antreesy requested a review from a team as a code owner September 7, 2026 15:27
@Antreesy
Antreesy requested review from Altahrim, CarlSchwan, leftybournes and salmart-dev and removed request for a team September 7, 2026 15:27
Comment on lines +272 to +279
$sourceShares = $this->getSharesForTarget($sourceNode);
foreach ($sourceShares as $sourceShare) {
foreach ($targetShares as $targetShare) {
if ($targetShare->getId() === $sourceShare->getId()) {
return true;
}
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checking it like this is very suboptimal performance wise. You can check if the destination is within the same share by just using string comparisons.

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Folder creation/renaming failed on team folders with share

3 participants