mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
This commit is contained in:
@@ -51,8 +51,11 @@ namespace Jackett.Common.Services
|
|||||||
|
|
||||||
private string ExePath()
|
private string ExePath()
|
||||||
{
|
{
|
||||||
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
|
||||||
return new FileInfo(location.AbsolutePath).FullName;
|
// https://stackoverflow.com/questions/896572
|
||||||
|
var location = new Uri(Assembly.GetEntryAssembly().GetName().EscapedCodeBase);
|
||||||
|
// Use LocalPath instead of AbsolutePath to avoid needing to unescape Uri format.
|
||||||
|
return new FileInfo(location.LocalPath).FullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartUpdateChecker()
|
public void StartUpdateChecker()
|
||||||
|
@@ -553,8 +553,11 @@ namespace Jackett.Updater
|
|||||||
|
|
||||||
private string GetUpdateLocation()
|
private string GetUpdateLocation()
|
||||||
{
|
{
|
||||||
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
|
||||||
return new FileInfo(WebUtility.UrlDecode(location.AbsolutePath)).DirectoryName;
|
// https://stackoverflow.com/questions/896572
|
||||||
|
var location = new Uri(Assembly.GetEntryAssembly().GetName().EscapedCodeBase);
|
||||||
|
// Use LocalPath instead of AbsolutePath to avoid needing to unescape Uri format.
|
||||||
|
return new FileInfo(location.LocalPath).DirectoryName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetJackettConsolePath(string directoryPath)
|
private string GetJackettConsolePath(string directoryPath)
|
||||||
|
Reference in New Issue
Block a user