mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Merge pull request #5157 from postcasio/da-handle-erofs
Handle EROFS errors when saving
This commit is contained in:
@@ -631,6 +631,8 @@ class Workspace extends Model
|
||||
atom.notifications.addWarning("Unable to save file '#{error.path}'", detail: error.message)
|
||||
else if error.code is 'EBUSY' and error.path?
|
||||
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 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")
|
||||
|
||||
Reference in New Issue
Block a user