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

Feature/validate filename for savefile dialog #940

Merged
merged 4 commits into from
Jan 16, 2022

Conversation

philenius
Copy link
Collaborator

Fixes #926.

Under Windows the save-file dialog did not open if the specified file name contained an illegal character. Windows prohibits the usage of reserved characters in file names. Now the exception IllegalCharacterInFileNameException is thrown if the specified file name contains forbidden characters.

I also activated many more linter rules, but I had to disable avoid_print because file_picker_io.dart contains print statements.

@miguelpruivo are you okay with my approach of throwing this custom exception? I'm open to suggestions for improvement.

Copy link
Owner

@miguelpruivo miguelpruivo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There's no problem in throwing an IllegalCharacterInFileNameException since it should be handled in the scope of all Exceptions anyway.

@miguelpruivo miguelpruivo merged commit d9abfb7 into master Jan 16, 2022
@miguelpruivo miguelpruivo deleted the feature/validate-filename-for-savefile-dialog branch January 16, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No error or dialog if filename has an incorrect character
2 participants