Skip to content

Use the more specific shell.openPath() on Windows - #10040

Merged
jennybc merged 1 commit into
mainfrom
system-opener-non-ascii-filepaths
Oct 20, 2025
Merged

jennybc merged 1 commit into
mainfrom
system-opener-non-ascii-filepaths

Conversation

@jennybc

@jennybc jennybc commented Oct 20, 2025

Copy link
Copy Markdown
Member

Addresses #9985

This fixes UiFrontendEvent.OpenWithSystem, which is experienced as browseURL() working in R for local filepaths that contain non-ascii characters, on Windows.

Here's a screenshot of executing browseURL("tütü") on Windows, where there is a local folder named "tütü". And it now dutifully opens in the Windows file explorer.

Screenshot 2025-10-20 110409

Before this fix the result looked like so:

Screenshot 2025-10-17 142907

UiFrontendEvent.OpenWithSystem ultimately routes into NativeHostMainService.doOpenShellExternal() which previously called (only) electron's shell.openExternal(), which is really designed for URLs, but also works for filepaths in many cases. However, on Windows, shell.openExternal() falls over for local filepaths with non-ascii characters and the recommended solution is to use shell.openPath() instead which really is meant exactly for this: "Open the given file in the desktop's default manner."

Related links:

Release Notes

New Features

  • N/A

Bug Fixes

  • N/A

QA Notes

@github-actions

Copy link
Copy Markdown
Contributor

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

@kevinushey kevinushey left a comment

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.

Nice sleuthing, LGTM!

@jennybc
jennybc merged commit 4298470 into main Oct 20, 2025
@jennybc
jennybc deleted the system-opener-non-ascii-filepaths branch October 20, 2025 22:58
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 20, 2025
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