electron: showItemInFolder doesn't work on Windows if . is in the path
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Issue Details
- Electron Version:
- 8.3.0
- 7.1.9
- Operating System:
- Windows
- Last Known Working Electron version:
- 7.1.8
Expected Behavior
Use shell.showItemInFolder to show the contents of a folder:
shell.showItemInFolder("C:\\repos\\.");
Actual Behavior
The contents of the folder is show in file explorer.
To Reproduce
// show contents of some folder on your machine
shell.showItemInFolder("C:\\repos\\.");
Additional Information
- I have a feeling that this is what broke this.
- Using
shell.openItemstill results in the expected behavior, even if there is a . in the path - That said, this does not repro on macOS and Linux. So while I’d be fine with this not getting fixed and just being told “use
openItem” because of the 2nd bullet, it’d be nice if the APIs were consistent across platforms. 🙃
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 20 (12 by maintainers)
bump
I just encountered this issue at 12.0.4 and my path has a dot in the middle of it (eg
C:/Folder.Name/file). Butpath.normalizeis a workaround. (also gets rid of the backslash issue on windows: #11617) Thanks @KavenWork for pointing it out therebump
bump
bump
On Fri, Oct 7, 2022, 10:20 PM github-actions[bot] @.***> wrote: