core: fix .net core 5.0 warnings. resolves #10433 (#10485)

This commit is contained in:
Diego Heras
2020-12-12 21:38:33 +01:00
committed by GitHub
parent eaa4126da5
commit 13baa27656
11 changed files with 29 additions and 52 deletions

View File

@@ -6,6 +6,7 @@ using System.Reflection;
using System.ServiceProcess;
using Jackett.Common.Services;
using Jackett.Common.Services.Interfaces;
using Jackett.Common.Utils;
using NLog;
namespace Jackett.Server.Services
@@ -49,10 +50,7 @@ namespace Jackett.Server.Services
}
else
{
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
// https://stackoverflow.com/questions/896572
var applicationFolder = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath);
var applicationFolder = EnvironmentUtil.JackettInstallationPath();
var exePath = Path.Combine(applicationFolder, SERVICEEXE);
if (!File.Exists(exePath) && Debugger.IsAttached)
{