[Settings]Fix crash showing non-existent template folder

This commit is contained in:
Jaime Bernardo 2024-10-03 14:21:08 +01:00
parent 6d69a79c75
commit b89233753a

View File

@ -250,12 +250,21 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
private void OpenNewTemplateFolder()
{
var process = new ProcessStartInfo()
try
{
FileName = _templateLocation,
UseShellExecute = true,
};
Process.Start(process);
CopyTemplateExamples(_templateLocation);
var process = new ProcessStartInfo()
{
FileName = _templateLocation,
UseShellExecute = true,
};
Process.Start(process);
}
catch (Exception ex)
{
Logger.LogError("Failed to show NewPlus template folder.", ex);
}
}
private async void PickNewTemplateFolder()