allow env vars in paths too

This commit is contained in:
Mike Griese 2021-11-01 14:52:27 -05:00
parent 2c895b2c18
commit 9f4ed0ee18

View file

@ -1161,7 +1161,8 @@ void Pane::_ControlWarningBellHandler(const winrt::Windows::Foundation::IInspect
auto sounds{ _profile.BellSound() };
if (sounds && sounds.Size() > 0)
{
winrt::Windows::Foundation::Uri uri{ sounds.GetAt(rand() % sounds.Size()) };
winrt::hstring soundPath{ wil::ExpandEnvironmentStringsW<std::wstring>(sounds.GetAt(rand() % sounds.Size()).c_str()) };
winrt::Windows::Foundation::Uri uri { soundPath };
_playBellSound(uri);
}
else