mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Ignore buffer errors when the path is a directory
This would previously cause Atom to fail to launch if a buffer's serialized path was now a directory on launch.
This commit is contained in:
@@ -66,7 +66,12 @@ class Project extends Model
|
||||
buffers: _.compact(@buffers.map (buffer) -> buffer.serialize() if buffer.isRetained())
|
||||
|
||||
deserializeParams: (params) ->
|
||||
params.buffers = params.buffers.map (bufferState) -> atom.deserializers.deserialize(bufferState)
|
||||
params.buffers = _.compact params.buffers.map (bufferState) ->
|
||||
try
|
||||
atom.deserializers.deserialize(bufferState)
|
||||
catch error
|
||||
# Ignore buffers for files that are now folders
|
||||
throw error unless error.code is 'EISDIR'
|
||||
params
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user