Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Initial paths shouldn't be normalized on save and restore [2] - #6978

Merged
maxbrunsfeld merged 3 commits into
atom:masterfrom
mostafaeweda:initial-paths-2
May 29, 2015
Merged

maxbrunsfeld merged 3 commits into
atom:masterfrom
mostafaeweda:initial-paths-2

Conversation

@mostafaeweda

Copy link
Copy Markdown

This PR fixed the undefined case and not being able to open new files and opening all url-style paths, config, preferences, ..etc.

Including url-style paths like remote://host:port/some/path in the initialPaths causes state loss issues, because the hash creation in: https://github.com/atom/atom/blob/master/src/atom.coffee#L93 creates a key that's different from the key got when restoring the state, because the initialPaths are normalized and not existing (see: https://github.com/atom/atom/blob/master/src/browser/atom-application.coffee#L372).

So, when the initialPaths contain a url, the state is never restored

This diff makes sure that project paths and initialPaths aren't normalized when not local paths

@bolinfest @maxbrunsfeld @benogle

Comment thread src/window-event-handler.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

@mostafaeweda Thanks for the quick fixup. I will merge this later today, after we 🚢 Atom 0.202.

@maxbrunsfeld maxbrunsfeld self-assigned this May 27, 2015
@mostafaeweda

Copy link
Copy Markdown
Author

Great to hear, thanks Max

@mostafaeweda

Copy link
Copy Markdown
Author

ping

@maxbrunsfeld

Copy link
Copy Markdown
Contributor

@mostafaeweda since our Travis build is a little flaky right now and does not run the integration tests, could you just confirm that all tests (including integration tests) pass on your machine w/ this change?

@mostafaeweda

Copy link
Copy Markdown
Author

Yea, I just double-checked that, including integration tests.

maxbrunsfeld pushed a commit that referenced this pull request May 29, 2015
Initial paths shouldn't be normalized on save and restore [2]
@maxbrunsfeld
maxbrunsfeld merged commit 686c72e into atom:master May 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants