aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-08-02 19:46:30 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-05 14:02:57 +0200
commitb5cd64e584ca9c91a11df204f3c040fdd2057a13 (patch)
tree9a0c1e7cfd8c97694ff1e14a9b0ab96b5a500d14 /apps/files_trashbin/lib
parent8511b89579b761798ea4f6ecf9257cad8d0bc462 (diff)
downloadnextcloud-server-b5cd64e584ca9c91a11df204f3c040fdd2057a13.tar.gz
nextcloud-server-b5cd64e584ca9c91a11df204f3c040fdd2057a13.zip
fix(files_trashbin): Original name of the deleted files should be set as display name for DAV
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashbinPlugin.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
index ffa6aa6ae6d..3299c2d6126 100644
--- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
+++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php
@@ -74,6 +74,11 @@ class TrashbinPlugin extends ServerPlugin {
return $node->getDeletedBy()?->getDisplayName();
});
+ // Pass the real filename as the DAV display name
+ $propFind->handle(FilesPlugin::DISPLAYNAME_PROPERTYNAME, function () use ($node) {
+ return $node->getFilename();
+ });
+
$propFind->handle(FilesPlugin::SIZE_PROPERTYNAME, function () use ($node) {
return $node->getSize();
});