[Settings]Fix crash showing non-existent New+ template folder (#35237)

[Settings]Fix crash showing non-existent template folder
This commit is contained in:
Jaime Bernardo 2024-10-03 17:24:23 +01:00 committed by GitHub
parent 577044163e
commit e7175302c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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()