Handle EINVAL errors on open

Closes atom/tree-view#408
This commit is contained in:
Kevin Sawicki
2015-07-20 17:04:17 -07:00
parent c039c820a4
commit 2c37294f3b

View File

@@ -442,8 +442,8 @@ class Workspace extends Model
when 'EACCES'
atom.notifications.addWarning("Permission denied '#{error.path}'")
return Q()
when 'EPERM', 'EBUSY', 'ENXIO', 'EIO', 'ENOTCONN', 'UNKNOWN', 'ECONNRESET'
atom.notifications.addWarning("Unable to open '#{error.path}'", detail: error.message)
when 'EPERM', 'EBUSY', 'ENXIO', 'EIO', 'ENOTCONN', 'UNKNOWN', 'ECONNRESET', 'EINVAL'
atom.notifications.addWarning("Unable to open '#{error.path ? uri}'", detail: error.message)
return Q()
else
throw error