Fix updater for update locations with spaces in the path

This commit is contained in:
kaso17 2017-01-24 14:04:03 +01:00
parent dd6b284ed8
commit 3b7a6ad038
2 changed files with 3 additions and 1 deletions

View File

@ -62,6 +62,7 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Net.Http.WebRequest" /> <Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View File

@ -9,6 +9,7 @@ using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web;
/* /*
// no supported by appveyor, disabeling for now // no supported by appveyor, disabeling for now
#if __MonoCS__ #if __MonoCS__
@ -223,7 +224,7 @@ namespace Jackett.Updater
private string GetUpdateLocation() private string GetUpdateLocation()
{ {
var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase); var location = new Uri(Assembly.GetEntryAssembly().GetName().CodeBase);
return new FileInfo(location.AbsolutePath).DirectoryName; return new FileInfo(HttpUtility.UrlDecode(location.AbsolutePath)).DirectoryName;
} }
} }
} }