diff --git a/lib/Sharing/DeckShareProvider.php b/lib/Sharing/DeckShareProvider.php index 03c732d08..c9bd6008d 100644 --- a/lib/Sharing/DeckShareProvider.php +++ b/lib/Sharing/DeckShareProvider.php @@ -36,6 +36,7 @@ use OCP\Share\IPartialShareProvider; use OCP\Share\IShare; use OCP\Share\IShareProviderGetUsers; +use function strlen; /** Taken from the talk shareapicontroller helper */ interface IShareProviderBackend { @@ -751,7 +752,9 @@ private function _getSharedWith( } if ($path !== null) { - $path = str_replace('/' . $userId . '/files', '', $path); + if (str_starts_with($path, '/' . $userId . '/files')) { + $path = substr($path, strlen('/' . $userId . '/files')); + } $path = rtrim($path, '/'); $onClause = $qb->expr()->andX(