Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/files_external/lib/Service/DBConfigService.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ private function getSelectQueryBuilder(): IQueryBuilder {
*/
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
Expand Down
2 changes: 1 addition & 1 deletion apps/files_external/tests/Config/ConfigAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function testPartialMountpointWithChildren(string $path, int $count): voi
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, [
Expand Down
Loading