mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
deduplicate getStorage() logic in Mount\Manager
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
43589312cc
commit
9281359fa4
1 changed files with 1 additions and 9 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue