diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 53c689e8a4..98b50cf05c 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -6,6 +6,7 @@ var modalDialogCustom = require('../ui/modal-dialog-custom') var remixLib = require('remix-lib') var EventManager = remixLib.EventManager var contextMenu = require('../ui/contextMenu') +var addTooltip = require('../ui/tooltip') var helper = require('../../lib/helper') var styleGuide = remixLib.ui.themeChooser @@ -163,11 +164,12 @@ function fileExplorer (appAPI, files) { self.treeView.event.register('leafRightClick', function (key, data, label, event) { contextMenu(event, { 'Rename': () => { - if (self.files.readonly) return + if (self.files.readonly) { return addTooltip('cannot rename. ' + self.files.type + ' is a read only explorer') } var name = label.querySelector('label[data-path="' + key + '"]') if (name) editModeOn(name) }, 'Delete': () => { + if (self.files.readonly) { return addTooltip('cannot delete. ' + self.files.type + ' is a read only explorer') } modalDialogCustom.confirm(null, 'Do you want to delete this file?', () => { files.remove(key) }, () => {}) } })