Skip to content

Fixed URL and FS path comparison on stop requests. #11229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2022

Conversation

kittaakos
Copy link
Contributor

What it does

It fixes the currentUrl vs frontendUri comparison when handling stop requests in the electron app.

For example:

currentUrl: file:///Applications/App%20Name.app/Contents/Resources/app/lib/index.html?port=57442#/path/to/workspace
frontentUri: /Applications/App Name.app/Contents/Resources/app/lib/index.html

Closes #11226

How to test

Well, probably if you check out Theia to a path that contains spaces, the close handler does not work. At least, I could reproduce this with the TheiaBlueprint app.

Review checklist

Reminder for reviewers

@msujew msujew self-requested a review May 31, 2022 13:22
Otherwise, if the bundled app has space in the name, comparision fails.

`currentUrl`: `file:///Applications/App%20Name.app/Contents/Resources/app/lib/index.html?port=57442#/path/to/workspace`
`frontendUri`: `/Applications/App Name.app/Contents/Resources/app/lib/index.html`

Closes eclipse-theia#11226

Co-authored-by: Akos Kitta <[email protected]>
Co-authored-by: Mark Sujew <[email protected]>

Signed-off-by: Akos Kitta <[email protected]>
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

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

I can confirm that the changes fix the issue 👍

  • Works for paths with spaces
  • Works for paths without spaces
  • Continues to work on Windows

@msujew msujew merged commit 6f0c4d3 into eclipse-theia:master May 31, 2022
@vince-fugnitto vince-fugnitto added this to the 1.27.0 milestone Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Electron] Stop handlers not executed when path contains space
3 participants