]> source.dussan.org Git - nextcloud-server.git/commitdiff
improve optimization for SharedStorage::instanceOfStorage(Common)
authorRobin Appelman <robin@icewind.nl>
Thu, 21 Apr 2022 12:51:09 +0000 (14:51 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Thu, 21 Apr 2022 14:29:30 +0000 (14:29 +0000)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_sharing/lib/SharedStorage.php

index 6a342f0bdbf672bf4d614bfe8643817ee45216b4..6caf082c248762c8bcd3f2115de7bbc8876fd0ff 100644 (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'])) {