Skip to content

Commit 3f2e420

Browse files
authored
Merge pull request #56971 from nextcloud/backport/56758/stable30
2 parents 00f745a + a4c4870 commit 3f2e420

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

18761876
foreach ($shares as $share) {
1877-
$sharedPath = $share->getNode()->getPath();
1877+
try {
1878+
$sharedPath = $share->getNode()->getPath();
1879+
} catch (NotFoundException $e) {
1880+
// node is not found, ignoring
1881+
$this->logger->debug(
1882+
'Could not find the node linked to a share',
1883+
['app' => 'files', 'exception' => $e]);
1884+
continue;
1885+
}
18781886
if ($targetPath === $sharedPath || str_starts_with($targetPath, $sharedPath . '/')) {
18791887
$this->logger->debug(
18801888
'It is not allowed to move one mount point into a shared folder',

0 commit comments

Comments
 (0)