Fixed settings saving
This commit is contained in:
parent
6c9a378911
commit
dbcccd2df6
|
@ -1178,6 +1178,7 @@ gm_world_name_changed(GmWorld *world) {
|
|||
|
||||
if (tmp_path && g_file_test(tmp_path, G_FILE_TEST_EXISTS)) {
|
||||
// Then! rename the old_path to the new_path
|
||||
GM_DEBUG("Renaming %s!", tmp_path);
|
||||
rename(tmp_path, world->priv->path);
|
||||
} else if (!g_file_test(world->priv->path, G_FILE_TEST_EXISTS)) {
|
||||
// There was no old path, so a new dir should be made
|
||||
|
@ -1186,12 +1187,12 @@ gm_world_name_changed(GmWorld *world) {
|
|||
|
||||
g_free(tmp_path);
|
||||
|
||||
tmp_path = g_strconcat(world->priv->path, G_DIR_SEPARATOR_S, "settings",
|
||||
tmp_path = g_strconcat(world->priv->path, G_DIR_SEPARATOR_S, "settings.xml",
|
||||
NULL);
|
||||
gm_options_save_as(world->priv->options, tmp_path);
|
||||
g_free(tmp_path);
|
||||
|
||||
tmp_path = g_strconcat(world->priv->path, G_DIR_SEPARATOR_S, "triggers",
|
||||
tmp_path = g_strconcat(world->priv->path, G_DIR_SEPARATOR_S, "triggers.xml",
|
||||
NULL);
|
||||
gm_triggers_save_as(world->priv->triggers, tmp_path);
|
||||
g_free(tmp_path);
|
||||
|
|
Reference in New Issue