From 558f53211d0ae462b86ae131a761d246b1b7f1db Mon Sep 17 00:00:00 2001 From: cyclamenkde Date: Wed, 21 Jun 2023 21:56:08 +0800 Subject: [PATCH] [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的容量分割为小数组