From 45afc9eb463613ab2cd70bd46afdfd8adcb44188 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 26 Mar 2015 13:29:30 -0700 Subject: [PATCH] Handle EISDIR save errors Closes #6100 --- src/pane.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pane.coffee b/src/pane.coffee index a1239acb5..a6e456d6a 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -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}'")