Commit e530595e authored by yann300's avatar yann300

warn if folder failed to be removed

parent d7152cd6
...@@ -237,7 +237,10 @@ function fileExplorer (localRegistry, files, menuItems) { ...@@ -237,7 +237,10 @@ function fileExplorer (localRegistry, files, menuItems) {
} }
actions['Delete'] = () => { actions['Delete'] = () => {
if (self.files.isReadOnly(key)) { return tooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') } if (self.files.isReadOnly(key)) { return tooltip('cannot delete folder. ' + self.files.type + ' is a read only explorer') }
modalDialogCustom.confirm('Confirm to delete a folder', 'Are you sure you want to delete this folder?', () => { files.remove(key) }, () => {}) modalDialogCustom.confirm('Confirm to delete a folder', 'Are you sure you want to delete this folder?',
() => {
if (!files.remove(key)) tooltip(`failed to remove ${key}. Make sure the directory is empty before removing it.`)
}, () => {})
} }
MENU_HANDLE = contextMenu(event, actions) MENU_HANDLE = contextMenu(event, actions)
}) })
......
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