Allow to fetch the creation time of folders

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-11-23 16:55:33 +01:00 committed by backportbot[bot]
parent 21a1b0cace
commit 3d8aa4e038

View file

@ -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();
});