mirror of
https://github.com/atom/atom.git
synced 2026-02-15 00:55:14 -05:00
Add error handling for EBUSY as well
This commit is contained in:
@@ -458,6 +458,8 @@ class Workspace extends Model
|
||||
atom.notifications.addWarning("Permission denied '#{error.path}'")
|
||||
when 'EPERM'
|
||||
atom.notifications.addWarning("Unable to open '#{error.path}'", detail: error.message)
|
||||
when 'EBUSY'
|
||||
atom.notifications.addWarning("Unable to open '#{error.path}'", detail: error.message)
|
||||
else
|
||||
throw error
|
||||
return Q()
|
||||
@@ -629,6 +631,8 @@ class Workspace extends Model
|
||||
atom.notifications.addWarning("Unable to save file: Permission denied '#{error.path}'")
|
||||
else if error.code is 'EPERM' and error.path?
|
||||
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 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