From 09b50f8740bb73342ff1a9ac255636ae75679cf5 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 15 Sep 2016 16:32:14 -0700 Subject: [PATCH] Don't remove non-local directories on Project deserialization --- spec/project-spec.coffee | 1 - src/project.coffee | 1 - 2 files changed, 2 deletions(-) diff --git a/spec/project-spec.coffee b/spec/project-spec.coffee index 67b0b9060..e207b1555 100644 --- a/spec/project-spec.coffee +++ b/spec/project-spec.coffee @@ -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()) diff --git a/src/project.coffee b/src/project.coffee index b4a7309b8..ff085c0a1 100644 --- a/src/project.coffee +++ b/src/project.coffee @@ -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