Commit 5754a406 authored by ioedeveloper's avatar ioedeveloper Committed by Liana Husikyan

Get file name to display in delete modal.

parent a80cb095
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment