summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Mount/Manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Mount/Manager.php')
-rw-r--r--lib/private/Files/Mount/Manager.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/Files/Mount/Manager.php b/lib/private/Files/Mount/Manager.php
index 91b6ad36c87..7770b9a6c58 100644
--- a/lib/private/Files/Mount/Manager.php
+++ b/lib/private/Files/Mount/Manager.php
@@ -31,10 +31,13 @@ namespace OC\Files\Mount;
use OC\Cache\CappedMemoryCache;
use OC\Files\Filesystem;
use OC\Files\SetupManager;
+use OC\Setup;
use OCP\Diagnostics\IEventLogger;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
+use OCP\Files\NotFoundException;
use OCP\IUserSession;
class Manager implements IMountManager {
@@ -47,11 +50,12 @@ class Manager implements IMountManager {
public function __construct(
IEventLogger $eventLogger,
IMountProviderCollection $mountProviderCollection,
- IUserSession $userSession
+ IUserSession $userSession,
+ IEventDispatcher $eventDispatcher
) {
$this->pathCache = new CappedMemoryCache();
$this->inPathCache = new CappedMemoryCache();
- $this->setupManager = new SetupManager($eventLogger, $mountProviderCollection, $this, $userSession);
+ $this->setupManager = new SetupManager($eventLogger, $mountProviderCollection, $this, $userSession, $eventDispatcher);
}
/**
@@ -122,7 +126,7 @@ class Manager implements IMountManager {
}
if ($current === '') {
- return null;
+ throw new NotFoundException("No mount for path " . $path . " existing mounts: " . implode(",", array_keys($this->mounts)));
}
$current = dirname($current);
@@ -214,4 +218,8 @@ class Manager implements IMountManager {
}
return $path;
}
+
+ public function getSetupManager(): SetupManager {
+ return $this->setupManager;
+ }
}