Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow to fetch the creation time of folders
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Nov 24, 2021
commit 6e1e0db13a736226e981f0c97b487d90440e768a
9 changes: 3 additions & 6 deletions apps/dav/lib/Connector/Sabre/FilesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,13 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
$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) {
Expand All @@ -423,10 +424,6 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
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();
});
Expand Down