Merge pull request #56969 from nextcloud/backport/56758/stable32

[stable32] fix: Fix orphan shares blocking moving other shares
This commit is contained in:
Côme Chilliet 2025-12-15 19:10:52 +01:00 committed by GitHub
commit e0e80c852d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1886,7 +1886,15 @@ class View {
}, $providers));
foreach ($shares as $share) {
$sharedPath = $share->getNode()->getPath();
try {
$sharedPath = $share->getNode()->getPath();
} catch (NotFoundException $e) {
// node is not found, ignoring
$this->logger->debug(
'Could not find the node linked to a share',
['app' => 'files', 'exception' => $e]);
continue;
}
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
$this->logger->debug(
'It is not allowed to move one mount point into a shared folder',