From a632ce35f5eae4904dd540137efbfcb9ecbd44c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20H=C3=A4rtl?= Date: Tue, 23 Nov 2021 16:55:33 +0100 Subject: [PATCH] Allow to fetch the creation time of folders MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/dav/lib/Connector/Sabre/FilesPlugin.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 3f2ae0f35ec..156507e4467 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -391,12 +391,13 @@ class FilesPlugin extends ServerPlugin { $user->getUID() ); }); - } - if ($node instanceof \OCA\DAV\Connector\Sabre\Node) { $propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) { return $this->config->getSystemValue('data-fingerprint', ''); }); + $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) { + return $node->getFileInfo()->getCreationTime(); + }); } if ($node instanceof \OCA\DAV\Connector\Sabre\File) { @@ -423,10 +424,6 @@ class FilesPlugin extends ServerPlugin { return new ChecksumList($checksum); }); - $propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) { - return $node->getFileInfo()->getCreationTime(); - }); - $propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) { return $node->getFileInfo()->getUploadTime(); }); -- 2.39.5