Skip to content

Commit

Permalink
Get file name to display in delete modal.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioedeveloper authored and LianaHus committed Mar 19, 2020
1 parent a80cb09 commit 5754a40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/files/file-explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,11 @@ function fileExplorer (localRegistry, files, menuItems) {
}
actions['Delete'] = () => {
if (self.files.isReadOnly(key)) { return tooltip('cannot delete file. ' + self.files.type + ' is a read only explorer') }
const currentPath = self._deps.config.get('currentFile').split('/')
const currentFilename = currentPath[currentPath.length - 1]

modalDialogCustom.confirm(
'Delete a file', 'Are you sure you want to delete this file?',
'Delete a file', `Are you sure you want to delete ${currentFilename} file?`,
() => {
files.remove(key)
self.updatePath('browser')
Expand Down

0 comments on commit 5754a40

Please sign in to comment.