Fixes conversion of files containing semicolons
All checks were successful
KnarCraft/FFmpegConvert/master This commit looks good

This commit is contained in:
2020-03-01 03:14:52 +01:00
parent 4e1cebd95d
commit 80a62cad23
2 changed files with 9 additions and 1 deletions

View File

@ -423,6 +423,14 @@ public abstract class Converter {
}
return new SubtitleStream(codecName, absoluteIndex, relativeIndex, language, title);
}
static String escapeSpecialCharactersInFileName(String fileName) {
return fileName.replace("'", "\\\\\\'")
.replace(",", "\\\\\\,")
.replace(";", "\\\\\\;")
.replace("]", "\\]")
.replace("[", "\\[");
}
static void print(String input) throws IOException {
if (!input.equals("")) {