mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
fix(external-storage): Rtrim trailing slash at the end
Otherwise we don't have any matches when $forChildren is false Signed-off-by: Carl Schwan <carlschwan@kde.org>
This commit is contained in:
parent
f61ef6d7e6
commit
761a6979a7
2 changed files with 2 additions and 1 deletions
|
|
@ -120,6 +120,7 @@ class DBConfigService {
|
|||
*/
|
||||
public function getMountsForUserAndPath(string $userId, array $groupIds, string $path, bool $forChildren): array {
|
||||
$path = str_replace('/' . $userId . '/files', '', $path);
|
||||
$path = rtrim($path, '/');
|
||||
$builder = $this->getSelectQueryBuilder();
|
||||
$builder->where($builder->expr()->orX(
|
||||
$builder->expr()->andX( // global mounts
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class ConfigAdapterTest extends TestCase {
|
|||
public function testPartialMountpointExact(): void {
|
||||
$mountFileInfo = $this->createMock(ICachedMountFileInfo::class);
|
||||
$mountFileInfo->method('getUser')->willReturn($this->user);
|
||||
$mountFileInfo->method('getMountPoint')->willReturn('/user1/files/subfolder/subfolder');
|
||||
$mountFileInfo->method('getMountPoint')->willReturn('/user1/files/subfolder/subfolder/');
|
||||
$cacheEntry = $this->createMock(ICacheEntry::class);
|
||||
|
||||
$result = $this->adapter->getMountsForPath('/user1/files/subfolder/subfolder', true, [
|
||||
|
|
|
|||
Loading…
Reference in a new issue