Skip to content

Commit 29166b6

Browse files
authored
Merge pull request #29876 from nextcloud/backport/29864/stable23
[stable23] Allow to fetch the creation time of folders
2 parents 21a1b0c + 3d8aa4e commit 29166b6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

apps/dav/lib/Connector/Sabre/FilesPlugin.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -391,12 +391,13 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
391391
$user->getUID()
392392
);
393393
});
394-
}
395394

396-
if ($node instanceof \OCA\DAV\Connector\Sabre\Node) {
397395
$propFind->handle(self::DATA_FINGERPRINT_PROPERTYNAME, function () use ($node) {
398396
return $this->config->getSystemValue('data-fingerprint', '');
399397
});
398+
$propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) {
399+
return $node->getFileInfo()->getCreationTime();
400+
});
400401
}
401402

402403
if ($node instanceof \OCA\DAV\Connector\Sabre\File) {
@@ -423,10 +424,6 @@ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node)
423424
return new ChecksumList($checksum);
424425
});
425426

426-
$propFind->handle(self::CREATION_TIME_PROPERTYNAME, function () use ($node) {
427-
return $node->getFileInfo()->getCreationTime();
428-
});
429-
430427
$propFind->handle(self::UPLOAD_TIME_PROPERTYNAME, function () use ($node) {
431428
return $node->getFileInfo()->getUploadTime();
432429
});

0 commit comments

Comments
 (0)