diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-03 17:15:02 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-03-04 16:30:16 +0100 |
commit | 917c74e214094e321ff96e1aa067ae60d22e2c58 (patch) | |
tree | 1b0c418966bec4c28785d1191a676310923c1180 /lib/private/Files/View.php | |
parent | 07a7dcb8249c9e25ea7a702e8c932520e2b32de6 (diff) | |
download | nextcloud-server-917c74e214094e321ff96e1aa067ae60d22e2c58.tar.gz nextcloud-server-917c74e214094e321ff96e1aa067ae60d22e2c58.zip |
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r-- | lib/private/Files/View.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 6f96f911785..779e0611591 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -274,7 +274,7 @@ class View { /** * remove mount point * - * @param \OC\Files\Mount\MoveableMount $mount + * @param IMountPoint $mount * @param string $path relative to data/ * @return boolean */ @@ -719,7 +719,7 @@ class View { $postFix = (substr($path, -1) === '/') ? '/' : ''; $absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path)); $mount = Filesystem::getMountManager()->find($absolutePath . $postFix); - if ($mount and $mount->getInternalPath($absolutePath) === '') { + if ($mount->getInternalPath($absolutePath) === '') { return $this->removeMount($mount, $absolutePath); } if ($this->is_dir($path)) { @@ -1383,10 +1383,6 @@ class View { $path = Filesystem::normalizePath($this->fakeRoot . '/' . $path); $mount = Filesystem::getMountManager()->find($path); - if (!$mount) { - \OC::$server->getLogger()->warning('Mountpoint not found for path: ' . $path); - return false; - } $storage = $mount->getStorage(); $internalPath = $mount->getInternalPath($path); if ($storage) { @@ -1488,7 +1484,7 @@ class View { $rootEntry = $subCache->get(''); if (!$rootEntry) { - $subScanner = $subStorage->getScanner(''); + $subScanner = $subStorage->getScanner(); try { $subScanner->scanFile(''); } catch (\OCP\Files\StorageNotAvailableException $e) { @@ -1916,14 +1912,10 @@ class View { * @param string $absolutePath absolute path * @param bool $useParentMount true to return parent mount instead of whatever * is mounted directly on the given path, false otherwise - * @return \OC\Files\Mount\MountPoint mount point for which to apply locks + * @return IMountPoint mount point for which to apply locks */ private function getMountForLock($absolutePath, $useParentMount = false) { - $results = []; $mount = Filesystem::getMountManager()->find($absolutePath); - if (!$mount) { - return $results; - } if ($useParentMount) { // find out if something is mounted directly on the path |