0.9.10claws5
[claws.git] / src / folderview.c
index 053b3b6905e1ba7ac65fefdad3648e95a98ece10..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);