From 10176357e4610c153d1caac51d00e1700202572c Mon Sep 17 00:00:00 2001 From: Sam Heinz <54530346+asylumexp@users.noreply.github.com> Date: Wed, 12 Mar 2025 23:05:19 +1000 Subject: [PATCH] [TB] fix: unpacking zip downloads may have unintended consequences by fixing this as it may now unpack zips in individual file downloads that aren't intended to be unpacked? --- server/RdtClient.Service/Services/TorrentRunner.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 6151100..a5b8072 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -447,13 +447,8 @@ public class TorrentRunner(ILogger logger, Torrents torrents, Dow // Check if the unpacking process is even needed var uri = new Uri(download.Link); - var fileName = uri.Segments.Last(); - fileName = HttpUtility.UrlDecode(fileName); - - Log($"Found file name {fileName}", download, torrent); - - var extension = Path.GetExtension(fileName); + var extension = Path.GetExtension(download.FileName); if ((extension != ".rar" && extension != ".zip") || torrent.DownloadClient == Data.Enums.DownloadClient.Symlink)