Merge pull request #56758 from nextcloud/fix/fix-orphan-share-blocking-moves

pull/56197/merge
Benjamin Gaussorgues 2025-12-02 10:45:40 +07:00 committed by GitHub
commit 86c2dd467d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

@ -1883,7 +1883,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',