diff options
author | Robin Appelman <robin@icewind.nl> | 2022-04-21 15:51:09 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-04-21 15:51:09 +0300 |
commit | f6d5eb9a755e0ccdc86464155ff4cd28fb5370b1 (patch) | |
tree | 32fd21395a155d60ba6259cfea15ea67ef91a1a8 /apps | |
parent | caebdc2a559f995ff5672cdea7c46a5febaa1ea5 (diff) |
improve optimization for SharedStorage::instanceOfStorage(Common)
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 3 |
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'])) { |