Skip to content

Commit 12c0329

Browse files
leftybournesKent Delante
authored andcommitted
fix(files_sharing): remove filename's leading slash on unshare toast
Signed-off-by: Kent Delante<kent@delante.me>
1 parent ecbb5d8 commit 12c0329

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

apps/files_sharing/src/mixins/SharesMixin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ export default {
291291
this.open = false
292292
await this.deleteShare(this.share.id)
293293
logger.debug('Share deleted', { shareId: this.share.id })
294+
const path = this.share.path.replace(/^\//, '')
294295
const message = this.share.itemType === 'file'
295-
? t('files_sharing', 'File "{path}" has been unshared', { path: this.share.path })
296-
: t('files_sharing', 'Folder "{path}" has been unshared', { path: this.share.path })
296+
? t('files_sharing', 'File "{path}" has been unshared', { path })
297+
: t('files_sharing', 'Folder "{path}" has been unshared', { path })
297298
showSuccess(message)
298299
this.$emit('remove:share', this.share)
299300
await this.getNode()

0 commit comments

Comments
 (0)