mirror of
https://github.com/slap-editor/slap.git
synced 2024-09-11 04:45:47 +03:00
refactor(editor-widget): add EACCES handling from Editor
This commit is contained in:
parent
52427caaf7
commit
e1ecd815df
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user