mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:25:03 +01:00
"Fix" SPIGOT-349 - don't allow + or ! in path.
By: md_5 <git@md-5.net>
This commit is contained in:
parent
d0fe692fd3
commit
6802819ab3
1 changed files with 6 additions and 0 deletions
|
@ -134,6 +134,12 @@ public class Main {
|
||||||
} else if (options.has("v")) {
|
} else if (options.has("v")) {
|
||||||
System.out.println(CraftServer.class.getPackage().getImplementationVersion());
|
System.out.println(CraftServer.class.getPackage().getImplementationVersion());
|
||||||
} else {
|
} else {
|
||||||
|
// Do you love Java using + and ! as string based identifiers? I sure do!
|
||||||
|
String path = new File(".").getAbsolutePath();
|
||||||
|
if (path.contains("!") || path.contains("+")) {
|
||||||
|
System.err.println("Cannot run server in a directory with ! or + in the pathname. Please rename the affected folders and try again,");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
||||||
String jline_UnsupportedTerminal = new String(new char[] {'j','l','i','n','e','.','U','n','s','u','p','p','o','r','t','e','d','T','e','r','m','i','n','a','l'});
|
String jline_UnsupportedTerminal = new String(new char[] {'j','l','i','n','e','.','U','n','s','u','p','p','o','r','t','e','d','T','e','r','m','i','n','a','l'});
|
||||||
|
|
Loading…
Add table
Reference in a new issue