Allow escape by \ for plugins with spaces in filename

This commit is contained in:
Frank van der Heijden 2021-12-21 23:19:46 +01:00
parent 2a5947c639
commit 2505f15cdf
No known key found for this signature in database
GPG key ID: B808721C2DD5B5B8
4 changed files with 174 additions and 127 deletions

View file

@ -72,6 +72,13 @@ public class JarFilesArgument<C extends ServerUtilsAudience<?>> extends CommandA
}
pluginFileName = builder.substring(1, builder.length() - 1);
} else {
if (builder.length() > 0) {
int lastChar;
while (builder.charAt((lastChar = builder.length() - 1)) == '\\' && !inputQueue.isEmpty()) {
builder.setCharAt(lastChar, ' ');
builder.append(inputQueue.remove());
}
}
pluginFileName = builder.toString();
}