]> source.dussan.org Git - nextcloud-server.git/commitdiff
deduplicate getStorage() logic in Mount\Manager
authorRobin Appelman <robin@icewind.nl>
Mon, 6 Feb 2023 17:17:40 +0000 (18:17 +0100)
committerRobin Appelman <robin@icewind.nl>
Mon, 6 Feb 2023 17:17:40 +0000 (18:17 +0100)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/Mount/MountPoint.php

index 49f7e560ad373f21e3ee6a76ad3dfc0e2baead01..770655fae50618cf3ce132e7e1467a7713de0928 100644 (file)
@@ -199,15 +199,7 @@ class MountPoint implements IMountPoint {
         */
        public function getStorageId() {
                if (!$this->storageId) {
-                       if (is_null($this->storage)) {
-                               $storage = $this->createStorage(); //FIXME: start using exceptions
-                               if (is_null($storage)) {
-                                       return null;
-                               }
-
-                               $this->storage = $storage;
-                       }
-                       $this->storageId = $this->storage->getId();
+                       $this->storageId = $this->getStorage()->getId();
                        if (strlen($this->storageId) > 64) {
                                $this->storageId = md5($this->storageId);
                        }