Skip to content
Draft
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
7 changes: 1 addition & 6 deletions lib/private/Files/Mount/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ public function moveMount(string $mountPoint, string $target) {
}

/**
* Find the mount for $path
*
* @param string $path
* @return IMountPoint
* Find/return the mount for $path
*/
public function find(string $path): IMountPoint {
$this->setupManager->setupForPath($path);
Expand All @@ -79,8 +76,6 @@ public function find(string $path): IMountPoint {
return $this->pathCache[$path];
}



if (count($this->mounts) === 0) {
$this->setupManager->setupRoot();
if (count($this->mounts) === 0) {
Expand Down
10 changes: 6 additions & 4 deletions lib/public/Files/Mount/IMountManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,15 @@ public function removeMount(string $mountPoint);
public function moveMount(string $mountPoint, string $target);

/**
* Find the mount for $path
* Finds and returns the mount point for a given path.
*
* @param string $path
* @return IMountPoint
* @param string $path The filesystem path to search for a mount.
* @return IMountPoint The found mount point.
* @throws \OCP\Files\NotFoundException If no mount is found for the path.
* @throws \Exception If no mounts exist after setup.
* @since 8.2.0
*/
public function find(string $path): ?IMountPoint;
public function find(string $path): IMountPoint;

/**
* Find all mounts in $path
Expand Down
Loading