Skip to content

Commit

Permalink
Fix for configuring starting directory in SUI when defaults sets it t…
Browse files Browse the repository at this point in the history
…o null (#9862)

## Summary of the Pull Request
Remove an unnecessary check in `Profiles.cpp` that was preventing us from enabling the text box and browse button when the user unchecks 'use parent process directory'

## PR Checklist
* [x] Closes #9847 
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [x] I work here

## Validation Steps Performed
Played around with it and it works.
  • Loading branch information
PankajBhojwani committed Apr 21, 2021
1 parent 2065fa7 commit ad34291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cascadia/TerminalSettingsEditor/Profiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
BackgroundImagePath(L"desktopWallpaper");
}
else if (HasBackgroundImagePath())
else
{
// Restore the path we had previously cached. This might be the
// empty string.
Expand Down Expand Up @@ -399,7 +399,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
}
StartingDirectory(L"");
}
else if (HasStartingDirectory())
else
{
// Restore the path we had previously cached as long as it wasn't empty
// If it was empty, set the starting directory to %USERPROFILE%
Expand Down

0 comments on commit ad34291

Please sign in to comment.