Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Make user renaming a bit more reliable. This should also prevent dupe…
Browse files Browse the repository at this point in the history
…s in some cases
  • Loading branch information
zml committed Sep 3, 2014
1 parent b475a49 commit 69b4f71
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ public boolean setIdentifier(String identifier) {
}
String oldNodePath = this.nodePath;
this.nodePath = FileBackend.buildPath(basePath, identifier);
this.node = this.config.createSection(nodePath, node.getValues(false));
this.entityName = identifier;
this.config.set(oldNodePath, null);
if (!this.isVirtual()) {
this.config.set(oldNodePath, null);
this.config.set(nodePath, node);
this.save();

} else {
this.config.set(nodePath, null);
}
return true;
}
Expand Down

0 comments on commit 69b4f71

Please sign in to comment.