diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-folder-commands.c | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index b9729866d2..d9fc450d54 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2002-03-22 Dan Winship <danw@ximian.com> + + * e-shell-folder-commands.c (e_shell_command_rename_folder): Use + e_folder_get_name. Don't assume it's the same as the last path + element. + 2002-03-21 Dan Winship <danw@ximian.com> * e-splash.c (e_splash_construct): Set the wmclass to diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index ada09a2b1d..a2b1055b5a 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -544,10 +544,7 @@ e_shell_command_rename_folder (EShell *shell, 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); - + old_name = e_folder_get_name (folder); old_name_locale = e_utf8_to_locale_string (old_name); prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name_locale); g_free (old_name_locale); @@ -576,8 +573,8 @@ e_shell_command_rename_folder (EShell *shell, return; } - old_base_path = g_strndup (folder_path, old_name - folder_path); - new_path = g_strconcat (old_base_path, new_name, NULL); + old_base_path = g_dirname (folder_path); + new_path = g_concat_dir_and_file (old_base_path, new_name); callback_data = rename_callback_data_new (shell_view, new_path); e_storage_set_async_xfer_folder (storage_set, folder_path, new_path, TRUE, rename_cb, callback_data); |