Client: Do not crash in SettingsDialog if the User folder is not set#73
Merged
Conversation
…ot present in a location As a consequence of puyonexus#52, SettingsDialog might look for user data in places it might not be present, particularly the "." folder. Previously this threw a std::filesystem::error that crashed the client. This commit replaces this behaviour with error writes to std::cerr.
jchv
approved these changes
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a consequence of #52, SettingsDialog might look for user data in places it might not be present, particularly the "." folder. Previously, this throws a std::filesystem::error that crashes the client. For now, let's replace the hard crash with a message in the standard error.
For the future, I suggest throwing a pop-up with more information if no asset of a particular type is found with a hyperlink to the Download page and information if not a single folder is available. Instructions for adding more folders for package maintainers should be provided. There also seems to be a bug where we have to resort to using "/./" in the file path, which I find very off-putting, prone to errors (when the path is taken literally without resolution) and possibly platform dependent.