ACTUALLY handle SQL passwords (or other fields) with '#' in them properly.

This commit is contained in:
GJ 2013-09-30 16:17:44 -04:00
parent 57541ec233
commit 7c9356955e

View File

@ -63,7 +63,7 @@ public abstract class AutoUpdateConfigLoader extends ConfigLoader {
output = output.replace(" ", " "); output = output.replace(" ", " ");
// Rip out Bukkit's attempt to save comments at the top of the file // Rip out Bukkit's attempt to save comments at the top of the file
while (output.indexOf('#') != -1) { while (!output.startsWith("General:")) {
output = output.substring(output.indexOf('\n', output.indexOf('#')) + 1); output = output.substring(output.indexOf('\n', output.indexOf('#')) + 1);
} }
@ -76,7 +76,7 @@ public abstract class AutoUpdateConfigLoader extends ConfigLoader {
String line; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
if (line.contains("#") && !line.contains("User_Password:")) { if (line.contains("#")) {
temp += line + "\n"; temp += line + "\n";
} }
else if (line.contains(":")) { else if (line.contains(":")) {