diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index c924ae1a5c0..fa7f5481640 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1888,8 +1888,11 @@ class View { foreach ($shares as $share) { try { $sharedPath = $share->getNode()->getPath(); - } catch (NotFoundException) { + } 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 . '/')) {