Properly fixes conversion of files with filenames containing square brackets
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good

Unknown whether this breaks conversion of filenames containing semicolons or apostrophes
This commit is contained in:
2020-03-15 18:25:04 +01:00
parent 4a23f91357
commit 0f9fbc06c7
2 changed files with 12 additions and 8 deletions

View File

@ -427,9 +427,9 @@ public abstract class Converter {
static String escapeSpecialCharactersInFileName(String fileName) {
return fileName.replace("'", "\\\\\\'")
.replace(",", "\\\\\\,")
.replace(";", "\\\\\\;");
/*.replace("]", "\\]") //Not sure whether these should be escaped or not
.replace("[", "\\[");*/
.replace(";", "\\\\\\;")
.replace("]", "\\]")
.replace("[", "\\[");
}
static void print(String input) throws IOException {