From f6d5eb9a755e0ccdc86464155ff4cd28fb5370b1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 21 Apr 2022 14:51:09 +0200 Subject: [PATCH] improve optimization for SharedStorage::instanceOfStorage(Common) Signed-off-by: Robin Appelman --- apps/files_sharing/lib/SharedStorage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'])) { -- 2.39.5