Skip to content

Commit

Permalink
Only replace - for database keys
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 7, 2013
1 parent 2cd75a9 commit ba76413
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/java/net/citizensnpcs/api/util/DataKey.java
Expand Up @@ -13,7 +13,6 @@ protected DataKey(String path) {
}

protected String createRelativeKey(String from) {
from = from.replace("-", "");
if (from.isEmpty())
return path;
if (from.charAt(0) == '.')
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/net/citizensnpcs/api/util/DatabaseStorage.java
Expand Up @@ -247,6 +247,11 @@ private DatabaseKey(String root) {
super(root);
}

@Override
protected String createRelativeKey(String from) {
return super.createRelativeKey(from.replace("-", ""));
}

@Override
public boolean getBoolean(String key) {
final Traversed t = traverse(createRelativeKey(key), false);
Expand Down

0 comments on commit ba76413

Please sign in to comment.