When we reload a profile, always use the same GUID for it #2542
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.
Summary of the Pull Request
This ensures that settings reload works for profiles w/o GUIDs.
After #2475, we no longer persist the auto-generated GUID for a profile. This means that when settings get reloaded, the profiles without GUIDs will get re-created, and the existing tabs with those profiles will no longer be associated with a profile. That's really bad, and can cause explosions.
This will ensure that we always generate the same GUID for a profile that didn't have one, preventing explosions.
If a person has two profiles with the same name and NO guid, then we'll generate the same GUID for both, then cull the second one when we validate that there should be no duplicate profiles.
References
#2475 caused this regression.
PR Checklist