From 7820c165f5dccf02dbb93d3407520d136846ccaa Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 9 May 2023 17:10:57 +0200 Subject: [PATCH] allow passing more info to lazy folder Signed-off-by: Robin Appelman --- lib/private/Files/Node/LazyFolder.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/private/Files/Node/LazyFolder.php b/lib/private/Files/Node/LazyFolder.php index d495d6f4c57e1..c307b55b5bc65 100644 --- a/lib/private/Files/Node/LazyFolder.php +++ b/lib/private/Files/Node/LazyFolder.php @@ -207,6 +207,9 @@ public function getInternalPath() { * @inheritDoc */ public function getId() { + if (isset($this->data['fileid'])) { + return $this->data['fileid']; + } return $this->__call(__FUNCTION__, func_get_args()); } @@ -221,6 +224,9 @@ public function stat() { * @inheritDoc */ public function getMTime() { + if (isset($this->data['mtime'])) { + return $this->data['mtime']; + } return $this->__call(__FUNCTION__, func_get_args()); } @@ -228,6 +234,9 @@ public function getMTime() { * @inheritDoc */ public function getSize($includeMounts = true): int|float { + if (isset($this->data['size'])) { + return $this->data['size']; + } return $this->__call(__FUNCTION__, func_get_args()); } @@ -235,6 +244,9 @@ public function getSize($includeMounts = true): int|float { * @inheritDoc */ public function getEtag() { + if (isset($this->data['etag'])) { + return $this->data['etag']; + } return $this->__call(__FUNCTION__, func_get_args()); } @@ -299,6 +311,12 @@ public function getParent() { * @inheritDoc */ public function getName() { + if (isset($this->data['path'])) { + return basename($this->data['path']); + } + if (isset($this->data['name'])) { + return $this->data['name']; + } return $this->__call(__FUNCTION__, func_get_args()); }