Skip to content

[Electron] Stop handlers not executed when path contains space #11226

@msujew

Description

@msujew

Bug Description:

When closing a Theia window, the path of the currently opened html file is checked against Theia's index.html:

const safeToClose = !currentUrl.includes(frontendUri) || await this.checkSafeToStop(reason);

However, if the current path contains a URL encodable character, this check fails, which results in OnWillStop handlers not being executed. Consequently, the user is never asked to confirm anything (unsaved editors, etc.) and the app simply closes.

Steps to Reproduce:

  1. Built a Theia app and place it in a path with a space
  2. Edit a file (disable auto save)
  3. Exit the application. The app should close without confirmation

Additional Information

  • Operating System: macOS, Windows
  • Theia Version: 1.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    electronissues related to the electron target

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions