Don't remove non-local directories on Project deserialization

This commit is contained in:
Max Brunsfeld
2016-09-15 16:32:14 -07:00
parent f74498e760
commit 09b50f8740
2 changed files with 0 additions and 2 deletions

View File

@@ -25,7 +25,6 @@ describe "Project", ->
deserializedProject = new Project({notificationManager: atom.notifications, packageManager: atom.packages, confirm: atom.confirm})
state = atom.project.serialize()
state.paths.push('/directory/that/does/not/exist')
state.paths.push(path.join(__dirname, 'fixtures', 'sample.js'))
deserializedProject.deserialize(state, atom.deserializers)
expect(deserializedProject.getPaths()).toEqual(atom.project.getPaths())

View File

@@ -56,7 +56,6 @@ class Project extends Model
deserialize: (state) ->
state.paths = [state.path] if state.path? # backward compatibility
state.paths = state.paths.filter (directoryPath) -> fs.isDirectorySync(directoryPath)
@buffers = _.compact state.buffers.map (bufferState) ->
# Check that buffer's file path is accessible