From 558f53211d0ae462b86ae131a761d246b1b7f1db Mon Sep 17 00:00:00 2001 From: cyclamenkde Date: Wed, 21 Jun 2023 21:56:08 +0800 Subject: [PATCH 1/2] [bug fix] When the environment is Linux/Unix, an exception will be thrown during the merge process due to incorrect paths --- src/N_m3u8DL-RE/Util/MergeUtil.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/N_m3u8DL-RE/Util/MergeUtil.cs b/src/N_m3u8DL-RE/Util/MergeUtil.cs index 5e37333..0e225e8 100644 --- a/src/N_m3u8DL-RE/Util/MergeUtil.cs +++ b/src/N_m3u8DL-RE/Util/MergeUtil.cs @@ -85,7 +85,9 @@ namespace N_m3u8DL_RE.Util else div = 200; - string outputName = Path.GetDirectoryName(files[0]) + "\\T"; + var delimiter=OperatingSystem.IsWindows()?"\\T":"/T"; + + string outputName = Path.GetDirectoryName(files[0]) + delimiter; int index = 0; //序号 //按照div的容量分割为小数组 From a1bfcec878360d14e46329c58959bf348b430bad Mon Sep 17 00:00:00 2001 From: cyclamenkde Date: Thu, 22 Jun 2023 14:37:05 +0800 Subject: [PATCH 2/2] [bug fix] When the environment is Linux/Unix, an exception will be thrown during the merge process due to incorrect paths --- src/N_m3u8DL-RE/Util/MergeUtil.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/N_m3u8DL-RE/Util/MergeUtil.cs b/src/N_m3u8DL-RE/Util/MergeUtil.cs index 0e225e8..be9e5ab 100644 --- a/src/N_m3u8DL-RE/Util/MergeUtil.cs +++ b/src/N_m3u8DL-RE/Util/MergeUtil.cs @@ -85,9 +85,7 @@ namespace N_m3u8DL_RE.Util else div = 200; - var delimiter=OperatingSystem.IsWindows()?"\\T":"/T"; - - string outputName = Path.GetDirectoryName(files[0]) + delimiter; + string outputName = Path.Combine(Path.GetDirectoryName(files[0])!, "T"); int index = 0; //序号 //按照div的容量分割为小数组