From 76658a0e56a7dae064b07a9fc978894d25ad0c99 Mon Sep 17 00:00:00 2001 From: MIRIMIRIM <59959583+MIRIMIRIM@users.noreply.github.com> Date: Sat, 11 Mar 2023 22:31:22 +0800 Subject: [PATCH] torrent use full path when build TorrentContent --- OKP.Core/Interface/TorrentContent.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OKP.Core/Interface/TorrentContent.cs b/OKP.Core/Interface/TorrentContent.cs index f1c73f0..785074d 100644 --- a/OKP.Core/Interface/TorrentContent.cs +++ b/OKP.Core/Interface/TorrentContent.cs @@ -96,6 +96,12 @@ public enum ContentTypes public static TorrentContent Build(string filename, string settingFile, string appLocation) { var settingFilePath = settingFile; + + if (Path.GetDirectoryName(filename) == "") + { + filename = Path.Combine(Environment.CurrentDirectory, filename); + } + if (Path.GetDirectoryName(settingFile) == "") { settingFilePath = Path.Combine(Path.GetDirectoryName(filename) ?? "", settingFile);