Skip to content

Commit e0e80c8

Browse files
authored
Merge pull request #56969 from nextcloud/backport/56758/stable32
[stable32] fix: Fix orphan shares blocking moving other shares
2 parents b4a18b0 + 02f23d5 commit e0e80c8

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
@@ -1886,7 +1886,15 @@ private function targetIsNotShared(string $user, string $targetPath): bool {
18861886
}, $providers));
18871887

18881888
foreach ($shares as $share) {
1889-
$sharedPath = $share->getNode()->getPath();
1889+
try {
1890+
$sharedPath = $share->getNode()->getPath();
1891+
} catch (NotFoundException $e) {
1892+
// node is not found, ignoring
1893+
$this->logger->debug(
1894+
'Could not find the node linked to a share',
1895+
['app' => 'files', 'exception' => $e]);
1896+
continue;
1897+
}
18901898
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
18911899
$this->logger->debug(
18921900
'It is not allowed to move one mount point into a shared folder',

0 commit comments

Comments
 (0)