GetExecutingAssembly points to the DLL on .NET Core not the exe (#7140)

This commit is contained in:
junglebus 2020-02-08 20:38:07 +11:00 committed by GitHub
parent af6c7b530b
commit 2d56ce11b7
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
using Jackett.Common.Models.Config;
using Jackett.Common.Models.Config;
using Jackett.Common.Services;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils;
@ -174,7 +174,7 @@ namespace Jackett.Tray
{
using (StreamWriter writer = new StreamWriter(ShortcutPath))
{
var appPath = Assembly.GetExecutingAssembly().Location;
var appPath = Process.GetCurrentProcess().MainModule.FileName;
writer.WriteLine("[InternetShortcut]");
writer.WriteLine("URL=file:///" + appPath);
writer.WriteLine("IconIndex=0");