diff --git a/src/N_m3u8DL-RE/Util/OtherUtil.cs b/src/N_m3u8DL-RE/Util/OtherUtil.cs index 69c602c..0a22190 100644 --- a/src/N_m3u8DL-RE/Util/OtherUtil.cs +++ b/src/N_m3u8DL-RE/Util/OtherUtil.cs @@ -53,10 +53,12 @@ namespace N_m3u8DL_RE.Util }; } + private static char[] InvalidChars = "34,60,62,124,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,58,42,63,92,47" + .Split(',').Select(s => (char)int.Parse(s)).ToArray(); public static string GetValidFileName(string input, string re = ".", bool filterSlash = false) { string title = input; - foreach (char invalidChar in Path.GetInvalidFileNameChars()) + foreach (char invalidChar in InvalidChars) { title = title.Replace(invalidChar.ToString(), re); }