Skip to content
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

fix: all files selection logic on linux #34496

Merged
merged 1 commit into from Jun 13, 2022
Merged

Conversation

codebytere
Copy link
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 in the last 24 hours label Jun 10, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours 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
Copy link

release-clerk bot commented Jun 13, 2022

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
Copy link
Contributor

trop bot commented Jun 13, 2022

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

@trop
Copy link
Contributor

trop bot commented Jun 13, 2022

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
Copy link
Contributor

trop bot commented Jun 13, 2022

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

khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
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