diff --git a/lib/private/Files/Mount/MountPoint.php b/lib/private/Files/Mount/MountPoint.php index 49f7e560ad373..00d295a04807c 100644 --- a/lib/private/Files/Mount/MountPoint.php +++ b/lib/private/Files/Mount/MountPoint.php @@ -172,6 +172,8 @@ private function createStorage() { if ($this->mountPoint === '/') { // the root storage could not be initialized, show the user! throw new \Exception('The root storage could not be initialized. Please contact your local administrator.', $exception->getCode(), $exception); + } elseif (substr_count($this->mountPoint, '/') == 2) { // home mount is `/getCode(), $exception); } else { \OC::$server->get(LoggerInterface::class)->error($exception->getMessage(), ['exception' => $exception]); } diff --git a/tests/lib/Files/Mount/MountPointTest.php b/tests/lib/Files/Mount/MountPointTest.php index 106a8f9a9328c..0776d13939b9b 100644 --- a/tests/lib/Files/Mount/MountPointTest.php +++ b/tests/lib/Files/Mount/MountPointTest.php @@ -56,7 +56,7 @@ public function testInvalidStorage() { $mountPoint = new \OC\Files\Mount\MountPoint( // just use this because a real class is needed '\Test\Files\Mount\DummyStorage', - '/mountpoint', + '/mountpoint/test', null, $loader );