mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 04:38:20 +00:00
This commit is contained in:
parent
a865a697fa
commit
e7a48c4234
2 changed files with 10 additions and 4 deletions
|
@ -51,8 +51,11 @@ namespace Jackett.Common.Services
|
|||
|
||||
private string ExePath()
|
||||
{
|
||||
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
||||
return new FileInfo(location.AbsolutePath).FullName;
|
||||
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
|
||||
// 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()
|
||||
|
|
|
@ -553,8 +553,11 @@ namespace Jackett.Updater
|
|||
|
||||
private string GetUpdateLocation()
|
||||
{
|
||||
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
|
||||
return new FileInfo(WebUtility.UrlDecode(location.AbsolutePath)).DirectoryName;
|
||||
// Use EscapedCodeBase to avoid Uri reserved characters from causing bugs
|
||||
// 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)
|
||||
|
|
Loading…
Reference in a new issue