diff options
author | md_5 <git@md-5.net> | 2015-01-05 09:24:38 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-01-05 09:24:44 +1100 |
commit | 93efa5a803b0b6759885ac1c0fa9c71788a27001 (patch) | |
tree | d3620cf6895234fe55703594bd5c2d1a0353e28a /src/main/java/org/bukkit | |
parent | c13376df5d338b14a87305cebbbc930d47d20cb2 (diff) | |
download | craftbukkit-93efa5a803b0b6759885ac1c0fa9c71788a27001.tar craftbukkit-93efa5a803b0b6759885ac1c0fa9c71788a27001.tar.gz craftbukkit-93efa5a803b0b6759885ac1c0fa9c71788a27001.tar.lz craftbukkit-93efa5a803b0b6759885ac1c0fa9c71788a27001.tar.xz craftbukkit-93efa5a803b0b6759885ac1c0fa9c71788a27001.zip |
"Fix" SPIGOT-349 - don't allow + or ! in path.
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/Main.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java index 9ffd8977..5f1eedb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -134,6 +134,12 @@ public class Main { } else if (options.has("v")) { System.out.println(CraftServer.class.getPackage().getImplementationVersion()); } 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 { // 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'}); |