improve optimization for SharedStorage::instanceOfStorage(Common)

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-04-21 14:51:09 +02:00
parent caebdc2a55
commit f6d5eb9a75
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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'])) {