Skip to content
Permalink
Browse files

Support categories with spaces in them.

For some reason, Java's Preferences class parses spaces as if they were
=, so categories with spaces in them don't work right. If the key simply
starts with left bracket, then we skip the whole value.
  • Loading branch information...
LadyCailin committed Sep 26, 2019
1 parent b8cd9e1 commit 9118c597a30ac0b8f60c8ad8e6461447c0ebcf8d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/laytonsmith/PureUtilities/Preferences.java
@@ -215,7 +215,7 @@ public void init(File prefFile) throws IOException {
userProperties.load(in);
}
for(String key : userProperties.stringPropertyNames()) {
if(key.matches("\\[.*\\]")) {
if(key.startsWith("[")) {
// group name, skip it.
continue;
}

0 comments on commit 9118c59

Please sign in to comment.
You can’t perform that action at this time.