mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Explicitly check if the path to be deserialized is a dir
This commit is contained in:
@@ -68,6 +68,7 @@ class Project extends Model
|
||||
deserializeParams: (params) ->
|
||||
params.buffers = _.compact params.buffers.map (bufferState) ->
|
||||
# Check that buffer's file path is accessible
|
||||
return if fs.isDirectorySync(bufferState.filePath)
|
||||
if bufferState.filePath
|
||||
try
|
||||
fs.closeSync(fs.openSync(bufferState.filePath, 'r'))
|
||||
|
||||
Reference in New Issue
Block a user