Skip to content

Commit 0311fb3

Browse files
authored
Merge pull request #56970 from nextcloud/backport/56758/stable31
[stable31] fix: Fix orphan shares blocking moving other shares
2 parents c4061a9 + 75171b8 commit 0311fb3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/private/Files/View.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,15 @@ private function targetIsNotShared(string $user, string $targetPath): bool {
19041904
}, $providers));
19051905

19061906
foreach ($shares as $share) {
1907-
$sharedPath = $share->getNode()->getPath();
1907+
try {
1908+
$sharedPath = $share->getNode()->getPath();
1909+
} catch (NotFoundException $e) {
1910+
// node is not found, ignoring
1911+
$this->logger->debug(
1912+
'Could not find the node linked to a share',
1913+
['app' => 'files', 'exception' => $e]);
1914+
continue;
1915+
}
19081916
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
19091917
$this->logger->debug(
19101918
'It is not allowed to move one mount point into a shared folder',

0 commit comments

Comments
 (0)