Don't let Bungee run in dirs with ! in name.

Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up.
This commit is contained in:
md_5 2014-07-19 21:22:20 +10:00
parent 87a64c3f3e
commit 65eba06980

View File

@ -162,6 +162,9 @@ public class BungeeCord extends ProxyServer
@SuppressFBWarnings("DM_DEFAULT_ENCODING")
public BungeeCord() throws IOException
{
// Java uses ! to indicate a resource inside of a jar/zip/other container. Running Bungee from within a directory that has a ! will cause this to muck up.
Preconditions.checkState( new File( "." ).getAbsolutePath().indexOf( '!' ) == -1, "Cannot use BungeeCord in directory with ! in path." );
System.setSecurityManager( new BungeeSecurityManager() );
try