From f69ed6f82384b86d06310ef2345d41a14ef7494a Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Wed, 11 Mar 2020 16:47:53 +0000 Subject: [PATCH] Get file name to display in delete modal. --- src/app/files/file-explorer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 3534f52a37..c552136969 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -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')