Skip to content

fix: all files selection logic on linux - #34496

Merged
zcbenz merged 1 commit into
mainfrom
fix-all-files-filter-linux
Jun 13, 2022
Merged

fix: all files selection logic on linux#34496
zcbenz merged 1 commit into
mainfrom
fix-all-files-filter-linux

Conversation

@codebytere

Copy link
Copy Markdown
Member

Description of Change

Closes #34492.

Fixes an issue where passing { name: 'All Files', extensions: ['*'] } in the filters param of open or save dialogs on linux would disallow choosing files without an extension. This was happening because we were modifying all filters passed in to prefix them with *.:

std::string pattern("*.");

meaning that the All Files extension would turn into *.*. This meaningfully changed behavior, because * in isolation allows a user to choose any file but *.* allows a user to choose any file with any extension but the extension must exist. This corrects that behavior.

Checklist

Release Notes

Notes: Fixes an issue where passing { name: 'All Files', extensions: ['*'] } in the filters param of open or save dialogs on Linux would disallow choosing files without an extension.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/18-x-y labels Jun 10, 2022
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jun 10, 2022
@codebytere
codebytere force-pushed the fix-all-files-filter-linux branch from 99b86a0 to 1d03cf6 Compare June 10, 2022 08:38
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jun 11, 2022
@zcbenz
zcbenz merged commit e5543a2 into main Jun 13, 2022
@zcbenz
zcbenz deleted the fix-all-files-filter-linux branch June 13, 2022 06:57
@release-clerk

release-clerk Bot commented Jun 13, 2022

Copy link
Copy Markdown

Release Notes Persisted

Fixes an issue where passing { name: 'All Files', extensions: ['*'] } in the filters param of open or save dialogs on Linux would disallow choosing files without an extension.

@trop

trop Bot commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "20-x-y", please check out #34516

@trop

trop Bot commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "19-x-y", please check out #34517

@trop trop Bot removed the target/20-x-y label Jun 13, 2022
@trop

trop Bot commented Jun 13, 2022

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "18-x-y", please check out #34518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: dialog.showOpenDialog cannot select file without extension on Linux

3 participants