From e2566e7a0c458b7a60594f7b16ff21ccbaf8ec06 Mon Sep 17 00:00:00 2001 From: Kent Delante Date: Mon, 15 Jun 2026 22:16:40 +0800 Subject: [PATCH 1/2] fix(files_sharing): remove slash from filename on unshare toast Signed-off-by: Kent Delante --- apps/files_sharing/src/mixins/SharesMixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index fa5dc2d5d27b6..39f2362236924 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -292,8 +292,8 @@ export default { await this.deleteShare(this.share.id) logger.debug('Share deleted', { shareId: this.share.id }) const message = this.share.itemType === 'file' - ? t('files_sharing', 'File "{path}" has been unshared', { path: this.share.path }) - : t('files_sharing', 'Folder "{path}" has been unshared', { path: this.share.path }) + ? t('files_sharing', 'File "{path}" has been unshared', { path: this.share.path.replaceAll('/', '') }) + : t('files_sharing', 'Folder "{path}" has been unshared', { path: this.share.path.replaceAll('/', '') }) showSuccess(message) this.$emit('remove:share', this.share) await this.getNode() From 69b5711017b4d3d50e5ca7125bdfd386918fc699 Mon Sep 17 00:00:00 2001 From: Kent Delante Date: Thu, 18 Jun 2026 20:45:36 +0800 Subject: [PATCH 2/2] fixup! fix(files_sharing): remove slash from filename on unshare toast --- apps/files_sharing/src/mixins/SharesMixin.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/src/mixins/SharesMixin.js b/apps/files_sharing/src/mixins/SharesMixin.js index 39f2362236924..7e0be45a5f57e 100644 --- a/apps/files_sharing/src/mixins/SharesMixin.js +++ b/apps/files_sharing/src/mixins/SharesMixin.js @@ -291,9 +291,13 @@ export default { this.open = false await this.deleteShare(this.share.id) logger.debug('Share deleted', { shareId: this.share.id }) + const isTopLevel = (this.share.path.match(/\//g) || []).length <= 1 + const path = isTopLevel + ? this.share.path.replace(/^\//, '') + : this.share.path const message = this.share.itemType === 'file' - ? t('files_sharing', 'File "{path}" has been unshared', { path: this.share.path.replaceAll('/', '') }) - : t('files_sharing', 'Folder "{path}" has been unshared', { path: this.share.path.replaceAll('/', '') }) + ? t('files_sharing', 'File "{path}" has been unshared', { path }) + : t('files_sharing', 'Folder "{path}" has been unshared', { path }) showSuccess(message) this.$emit('remove:share', this.share) await this.getNode()