mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #28730 from nextcloud/backport/27540/stable21
This commit is contained in:
commit
f82c4d31ba
1 changed files with 7 additions and 1 deletions
|
|
@ -269,7 +269,13 @@ class MountPoint implements IMountPoint {
|
|||
*/
|
||||
public function getStorageRootId() {
|
||||
if (is_null($this->rootId) || $this->rootId === -1) {
|
||||
$this->rootId = (int)$this->getStorage()->getCache()->getId('');
|
||||
$storage = $this->getStorage();
|
||||
// if we can't create the storage return -1 as root id, this is then handled the same as if the root isn't scanned yet
|
||||
if ($storage === null) {
|
||||
$this->rootId = -1;
|
||||
} else {
|
||||
$this->rootId = (int)$storage->getCache()->getId('');
|
||||
}
|
||||
}
|
||||
return $this->rootId;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue