Fix GroupManager.RenameGroup() overwriting unsaved config changes

This commit is contained in:
ProfessorXZ 2017-09-28 16:40:03 +02:00
parent ec435e266e
commit 639ffb3c7c

View file

@ -275,6 +275,8 @@ namespace TShockAPI.DB
group.Parent = newGroup;
}
// Read the config file to prevent the possible loss of any unsaved changes
TShock.Config = ConfigFile.Read(FileTools.ConfigPath);
if (TShock.Config.DefaultGuestGroupName == oldGroup.Name)
{
TShock.Config.DefaultGuestGroupName = newGroup.Name;