From 3952831ff192b3be678c4af153c0377c77b9ff79 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 3 Mar 2015 13:53:18 -0800 Subject: [PATCH] Add custom notification for ENOSPC save errors Closes #5825 --- src/pane.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pane.coffee b/src/pane.coffee index 15f6fa0da..5cdc3016a 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -683,6 +683,8 @@ class Pane extends Model atom.notifications.addWarning("Unable to save file '#{error.path}'", detail: error.message) else if error.code is 'EROFS' and error.path? atom.notifications.addWarning("Unable to save file: Read-only file system '#{error.path}'") + else if error.code is 'ENOSPC' and error.path? + atom.notifications.addWarning("Unable to save file: No space left on device '#{error.path}'") else if errorMatch = /ENOTDIR, not a directory '([^']+)'/.exec(error.message) fileName = errorMatch[1] atom.notifications.addWarning("Unable to save file: A directory in the path '#{fileName}' could not be written to")