Handle EISDIR save errors

Closes #6100
This commit is contained in:
Kevin Sawicki
2015-03-26 13:29:30 -07:00
parent d9527fd8ad
commit 45afc9eb46

View File

@@ -686,7 +686,7 @@ class Pane extends Model
true
handleSaveError: (error) ->
if error.message.endsWith('is a directory')
if error.code is 'EISDIR' or error.message.endsWith('is a directory')
atom.notifications.addWarning("Unable to save file: #{error.message}")
else if error.code is 'EACCES' and error.path?
atom.notifications.addWarning("Unable to save file: Permission denied '#{error.path}'")