From 2bb8f7a56901c995e3f0c1a93f8cc99cc6312d86 Mon Sep 17 00:00:00 2001 From: Jonas Date: Wed, 1 Apr 2026 09:25:13 +0200 Subject: [PATCH] fix(FileListInfo): strip attachments folder from collectives path When opening an attachment via "Show in Files" action, the Files app opens the `.attachments.` folder. Until now, the "Open in Collectives" button then pointed to a broken Collectives link as `.attachments.` became part of the Collectives link. Fixes: #2371 Signed-off-by: Jonas --- src/views/FileListInfo.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/FileListInfo.vue b/src/views/FileListInfo.vue index 929c56b2d..431dbd6b0 100644 --- a/src/views/FileListInfo.vue +++ b/src/views/FileListInfo.vue @@ -59,9 +59,13 @@ export default { computed: { collectivesLink() { - const collectivesPath = this.internalPath.startsWith(collectivesFolder) + let collectivesPath = this.internalPath.startsWith(collectivesFolder) ? this.internalPath.slice(collectivesFolder.length) : '' + + // strip `/.attachments.` suffix if present + collectivesPath = collectivesPath.replace(/\/\.attachments\.\d+$/, '') + return generateUrl('/apps/collectives' + collectivesPath) }, },