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

electron: fix canRead implementation #10131

Merged
merged 1 commit into from
Sep 29, 2021
Merged

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes: #10103

The pull-request updates and simplifies the ElectronFileDialogService.canRead method which previously produced false positive messages to end-users about unreadable resources.

The changes should:

  • fix the bug reported in Cannot read 1 resources #10103
  • fail to open a resource when it is unreadable
  • not introduce any regressions when opening resources in electron through the open file or open folder dialogs

How to test

  • start the example-electron application
  • confirm that open file and open folder work correctly
  • confirm that readonly files can in fact be opened
  • confirm that if a file is unreadable (no permissions) that it cannot be opened and will display an error notification:

image

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added file dialog issues related to the file dialog electron issues related to the electron target labels Sep 17, 2021
@vince-fugnitto vince-fugnitto self-assigned this Sep 17, 2021
@vince-fugnitto
Copy link
Member Author

@DevTester425 you can test the pull-request if you'd like to confirm it fixes the issue you've experienced.

The commit simplifies the `canRead` implementation (used to determine if
resources cannot be read), and fixes the issue where the message would
not display the correct resource.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto force-pushed the vf/readonly-electron-fix branch from ed81ab9 to 2cbb0f4 Compare September 20, 2021 12:31
@vince-fugnitto vince-fugnitto merged commit 47031c9 into master Sep 29, 2021
@vince-fugnitto vince-fugnitto deleted the vf/readonly-electron-fix branch September 29, 2021 17:20
@github-actions github-actions bot added this to the 1.18.0 milestone Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target file dialog issues related to the file dialog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read 1 resources
2 participants