aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Filesystem.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-03 17:15:02 +0100
committerRobin Appelman <robin@icewind.nl>2022-03-04 16:30:16 +0100
commit917c74e214094e321ff96e1aa067ae60d22e2c58 (patch)
tree1b0c418966bec4c28785d1191a676310923c1180 /lib/private/Files/Filesystem.php
parent07a7dcb8249c9e25ea7a702e8c932520e2b32de6 (diff)
downloadnextcloud-server-917c74e214094e321ff96e1aa067ae60d22e2c58.tar.gz
nextcloud-server-917c74e214094e321ff96e1aa067ae60d22e2c58.zip
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Filesystem.php')
-rw-r--r--lib/private/Files/Filesystem.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index b392b1aa3cb..1aedad93aa1 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -38,16 +38,12 @@
namespace OC\Files;
use OC\Cache\CappedMemoryCache;
-use OC\Files\Config\MountProviderCollection;
use OC\Files\Mount\MountPoint;
-use OC\Lockdown\Filesystem\NullStorage;
use OC\User\NoUserException;
use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Files\Config\IMountProvider;
use OCP\Files\Events\Node\FilesystemTornDownEvent;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorageFactory;
-use OCP\ILogger;
use OCP\IUser;
use OCP\IUserManager;
@@ -262,11 +258,7 @@ class Filesystem {
\OC_Util::setupFS();
}
$mount = self::$mounts->find($path);
- if ($mount) {
- return $mount->getMountPoint();
- } else {
- return '';
- }
+ return $mount->getMountPoint();
}
/**
@@ -322,11 +314,7 @@ class Filesystem {
*/
public static function resolvePath($path) {
$mount = self::getMountManager()->find($path);
- if ($mount) {
- return [$mount->getStorage(), rtrim($mount->getInternalPath($path), '/')];
- } else {
- return [null, null];
- }
+ return [$mount->getStorage(), rtrim($mount->getInternalPath($path), '/')];
}
public static function init($user, $root) {