Skip to content

Commit c641dfa

Browse files
authored
Merge pull request #61303 from nextcloud/leftybournes/fix/sharing-remove-slash-on-unshare-toast
fix(files_sharing): remove leading slash from filename on unshare toast
2 parents 1a59ea9 + 5b6139c commit c641dfa

5 files changed

Lines changed: 9 additions & 8 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()

dist/1991-1991.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/1991-1991.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/files_sharing-files_sharing_tab.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)