refactor(editor-widget): add EACCES handling from Editor

This commit is contained in:
Dan Kaplun 2015-06-13 01:30:08 -04:00
parent 52427caaf7
commit e1ecd815df

View File

@ -61,6 +61,9 @@ Slap.prototype.open = Promise.method(function (filePath, current) {
.catch(function (err) {
pane.close();
switch ((err.cause || err).code) {
case 'EACCES':
self.screen.header.message(err.message, 'error');
break;
case 'EISDIR':
self.fileBrowser.refresh(filePath, _.noop);
self.fileBrowser.focus();