Add notification for ENXIO save error

Closes #5576
This commit is contained in:
Kevin Sawicki
2015-04-14 15:25:36 -07:00
parent 7ea71deb96
commit 55b6499b7d

View File

@@ -644,6 +644,8 @@ class Pane extends Model
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 error.code is 'ENXIO' and error.path?
atom.notifications.addWarning("Unable to save file: No such device or address '#{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")