Skip to content

Commit 61f7a87

Browse files
committed
fix: remove user part only at the beginning of path
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
1 parent 6d8321e commit 61f7a87

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/Sharing/DeckShareProvider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,9 @@ private function _getSharedWith(
752752
}
753753

754754
if ($path !== null) {
755-
if (str_starts_with($path, '/' . $userId . '/files')) {
756-
$path = substr($path, strlen('/' . $userId . '/files'));
755+
$prefix = '/' . $userId . '/files';
756+
if (str_starts_with($path, $prefix)) {
757+
$path = substr($path, strlen($prefix));
757758
}
758759
$path = rtrim($path, '/');
759760

0 commit comments

Comments
 (0)