Explicitly check if the path to be deserialized is a dir

This commit is contained in:
Ben Ogle
2015-01-16 10:53:35 -08:00
parent 93f109fbba
commit 2577843e51

View File

@@ -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'))