From 078bbe4bfba532c7a49b55ba27fffef81140f630 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Mon, 2 Sep 2024 21:08:00 -0600 Subject: [PATCH] Prevent creation of download folders when using the symlink downloader. --- server/RdtClient.Service/Helpers/DownloadHelper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/RdtClient.Service/Helpers/DownloadHelper.cs b/server/RdtClient.Service/Helpers/DownloadHelper.cs index 0c9a1c4..94d1583 100644 --- a/server/RdtClient.Service/Helpers/DownloadHelper.cs +++ b/server/RdtClient.Service/Helpers/DownloadHelper.cs @@ -1,4 +1,5 @@ using System.Web; +using RdtClient.Data.Enums; using RdtClient.Data.Models.Data; namespace RdtClient.Service.Helpers; @@ -41,7 +42,7 @@ public static class DownloadHelper } } - if (!Directory.Exists(torrentPath)) + if (torrent.DownloadClient != DownloadClient.Symlink && !Directory.Exists(torrentPath)) { Directory.CreateDirectory(torrentPath); } @@ -85,7 +86,7 @@ public static class DownloadHelper } } - if (!Directory.Exists(torrentPath)) + if (torrent.DownloadClient != DownloadClient.Symlink && !Directory.Exists(torrentPath)) { Directory.CreateDirectory(torrentPath); }