Always use process location for file association

This commit is contained in:
erri120 2022-11-04 11:53:24 +01:00
parent 022eb135e1
commit 92b657ba82
No known key found for this signature in database

View File

@ -151,7 +151,10 @@ namespace Wabbajack
{ {
var applicationRegistrationService = _serviceProvider.GetRequiredService<IApplicationRegistrationService>(); var applicationRegistrationService = _serviceProvider.GetRequiredService<IApplicationRegistrationService>();
var applicationInfo = new ApplicationInfo("Wabbajack", "Wabbajack", "Wabbajack", location); var processLocation = Process.GetCurrentProcess().MainModule?.FileName ??
throw new NotSupportedException("Unable to get process information");
var applicationInfo = new ApplicationInfo("Wabbajack", "Wabbajack", "Wabbajack", processLocation);
applicationInfo.SupportedExtensions.Add("wabbajack"); applicationInfo.SupportedExtensions.Add("wabbajack");
applicationRegistrationService.RegisterApplication(applicationInfo); applicationRegistrationService.RegisterApplication(applicationInfo);
} }