mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
During session save, use the profile's GUID rather than its Name (#19113)
This will prevent Terminal from erroneously selecting a hidden (deleted, disabled or otherwise) profile of the same name during restoration and subsequently using the wrong settings. I am not certain why we used the name at all! Closes #19105 (cherry picked from commit c4fbb58f69b0a5cc86c245505311d0a0b3cc1399) Service-Card-Id: PVTI_lADOAF3p4s4AxadtzgcbMe0 Service-Version: 1.23
This commit is contained in:
parent
7d751a54bd
commit
b6c7410a33
@ -95,7 +95,7 @@ namespace winrt::TerminalApp::implementation
|
||||
NewTerminalArgs args{};
|
||||
const auto& controlSettings = _control.Settings();
|
||||
|
||||
args.Profile(controlSettings.ProfileName());
|
||||
args.Profile(::Microsoft::Console::Utils::GuidToString(_profile.Guid()));
|
||||
// If we know the user's working directory use it instead of the profile.
|
||||
if (const auto dir = _control.WorkingDirectory(); !dir.empty())
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user