aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-folder-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-folder-commands.c')
-rw-r--r--shell/e-shell-folder-commands.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index e90b29a12f..1f7b815ab6 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -475,6 +475,7 @@ e_shell_command_rename_folder (EShell *shell,
const char *folder_path)
{
EStorageSet *storage_set;
+ EFolder *folder;
const char *old_name;
char *prompt;
char *new_name;
@@ -491,6 +492,9 @@ e_shell_command_rename_folder (EShell *shell,
if (folder_path == NULL)
folder_path = e_shell_view_get_current_path (shell_view);
+ folder = e_storage_set_get_folder (storage_set, folder_path);
+ g_return_if_fail (folder != NULL);
+
/* Note that we don't need to get the display name here, as the stock
folders cannot be renamed anyway. */
old_name = g_basename (folder_path);
@@ -510,6 +514,8 @@ e_shell_command_rename_folder (EShell *shell,
return;
}
+ e_folder_set_name (folder, new_name);
+
old_base_path = g_strndup (folder_path, old_name - folder_path);
new_path = g_strconcat (old_base_path, new_name, NULL);