mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
This commit fixes a race condition in the `attemptRestoreProjectStateForPaths` function that could cause a file to be opened more than once within the same workspace pane. In particular, when opening some file into an empty window, Atom tries to recover the state for the project containing the file (if there is one). However, we were previously not waiting until the `AtomEnvironment`'s state had been fully deserialized before trying to load the requested file into the workspace. If the same file also existed in the serialized representation of the workspace, it could end up being opened twice. With this commit we will now wait until the environment has been fully deserialized before honoring the user's request of loading new files into an empty window. Also, tests have been restructured to test more thoroughly this interaction.
29 KiB
29 KiB