Skip to content

Commit 86c2dd4

Browse files
authored
Merge pull request #56758 from nextcloud/fix/fix-orphan-share-blocking-moves
2 parents 3b2a306 + f453411 commit 86c2dd4

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

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

0 commit comments

Comments
 (0)