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

@@ -52,7 +52,7 @@ namespace Jackett.Common.Services
throw new Exception("Could not create settings directory. " + ex.Message);
}
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
try
{
@@ -69,9 +69,7 @@ namespace Jackett.Common.Services
{
try
{
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
// https://stackoverflow.com/questions/896572
processService.StartProcessAndLog(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath, "--MigrateSettings", true);
processService.StartProcessAndLog(EnvironmentUtil.JackettExecutablePath(), "--MigrateSettings", true);
}
catch
{
@@ -166,9 +164,7 @@ namespace Jackett.Common.Services
}
}
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
// https://stackoverflow.com/questions/896572
public string ApplicationFolder() => Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath);
public string ApplicationFolder() => EnvironmentUtil.JackettInstallationPath();
public string GetContentFolder()
{