frontend: Use default location for user settings as fallback #12040
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.
Description
Enables OBS Studio to fall back on default paths for settings, profiles, and scene collections when configured paths do not exist.
Motivation and Context
When a unique path is set up as the location for user settings, profiles, or scene collections, migrating the files from one computer to another will lead to confusing error messages as the original paths might not exist on the new machine.
The default directories for configuration files are already created by this point, so using those paths as a fallback should enable OBS Studio to also create the corresponding fallback settings files.
While this might lead to a confusing "in-between" state as OBS Studio will just carry on launching, creating fallbacks for everything, this is in line with current behaviour in the rest of the application.
How Has This Been Tested?
Tested locally with bad paths set up in
global.ini
and also with an emptyglobal.ini
to ensure that no "empty migration" takes place.Types of changes
Checklist: