aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-04-21 14:51:09 +0200
committerRobin Appelman <robin@icewind.nl>2022-04-21 14:51:09 +0200
commitf6d5eb9a755e0ccdc86464155ff4cd28fb5370b1 (patch)
tree32fd21395a155d60ba6259cfea15ea67ef91a1a8 /apps/files_sharing
parentcaebdc2a559f995ff5672cdea7c46a5febaa1ea5 (diff)
downloadnextcloud-server-f6d5eb9a755e0ccdc86464155ff4cd28fb5370b1.tar.gz
nextcloud-server-f6d5eb9a755e0ccdc86464155ff4cd28fb5370b1.zip
improve optimization for SharedStorage::instanceOfStorage(Common)
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index 6a342f0bdbf..6caf082c248 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -35,6 +35,7 @@ namespace OCA\Files_Sharing;
use OC\Files\Cache\FailedCache;
use OC\Files\Cache\NullWatcher;
use OC\Files\Cache\Watcher;
+use OC\Files\Storage\Common;
use OCP\Files\Folder;
use OCP\Files\Node;
use OC\Files\Storage\FailedStorage;
@@ -182,7 +183,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
* @inheritdoc
*/
public function instanceOfStorage($class): bool {
- if ($class === '\OC\Files\Storage\Common') {
+ if ($class === '\OC\Files\Storage\Common' || $class == Common::class) {
return true;
}
if (in_array($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage', '\OCP\Files\IHomeStorage'])) {