Url decode the filename, sometimes RD would return a url encoded string, sometimes not.
This commit is contained in:
parent
4a985cc1f4
commit
b1c70b723f
1 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Downloader;
|
||||
using RdtClient.Data.Models.Data;
|
||||
using RdtClient.Service.Helpers;
|
||||
|
|
@ -61,6 +62,9 @@ namespace RdtClient.Service.Services
|
|||
}
|
||||
|
||||
var fileName = uri.Segments.Last();
|
||||
|
||||
fileName = HttpUtility.UrlDecode(fileName);
|
||||
|
||||
var filePath = Path.Combine(torrentPath, fileName);
|
||||
|
||||
if (File.Exists(filePath))
|
||||
|
|
|
|||
Loading…
Reference in a new issue