0.9.10claws5
[claws.git] / src / folderview.c
index b41035864004ca145b0c1426b40e73312b7f0149..f556f1d1a8cba250f48f2110a100680d15026200 100644 (file)
@@ -2106,13 +2106,14 @@ static void folderview_rename_folder_cb(FolderView *folderview, guint action,
        }
 
        Xstrdup_a(old_path, item->path, {g_free(new_folder); return;});
-       old_id = folder_item_get_identifier(item);
 
        if (item->folder->klass->rename_folder(item->folder, item, new_folder) < 0) {
-               g_free(old_id);
+               alertpanel_error(_("The folder could not be renamed.\n"
+                                  "The new folder name could not be allowed."));
                return;
        }
 
+       old_id = folder_item_get_identifier(item);
        /* if (FOLDER_TYPE(item->folder) == F_MH)
                prefs_filtering_rename_path(old_path, item->path); */
        new_id = folder_item_get_identifier(item);
@@ -2137,7 +2138,8 @@ static void folderview_rename_folder_cb(FolderView *folderview, guint action,
        }
 
        gtk_clist_thaw(GTK_CLIST(ctree));
-
+       
+       folder_item_prefs_save_config(item);
        folder_write_list();
 }