Allow escape by \ for plugins with spaces in filename
This commit is contained in:
parent
2a5947c639
commit
2505f15cdf
4 changed files with 174 additions and 127 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue