From d80cafe84dc7f053c21bb1ddd74a6b45ad3c301c Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 27 Jan 2004 04:17:27 +0000 Subject: fix the parent-finding logic. 2004-01-27 Not Zed * em-folder-tree-model.c (folder_renamed): fix the parent-finding logic. 2004-01-23 Not Zed * mail-component.c (mail_component_init): add the offline handler interface to the component. (store_go_online, go_online): removed, handled by the offline handler. * mail-offline-handler.c (store_go_online): add the store to the tree model when we go online. svn path=/trunk/; revision=24459 --- mail/em-folder-tree-model.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mail/em-folder-tree-model.c') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 5811cb09ef..cd0b1de9e0 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -604,10 +604,10 @@ folder_renamed (CamelStore *store, CamelRenameInfo *info, EMFolderTreeModel *mod em_folder_tree_model_remove_folders (model, si, &iter); parent = g_strdup (info->new->path); - if ((p = strrchr (parent + 1, '/'))) - *p = '\0'; - - if (!strcmp (parent, "/")) { + p = strrchr(parent, '/'); + g_assert(p); + *p = 0; + if (parent == p) { /* renamed to a toplevel folder on the store */ path = gtk_tree_row_reference_get_path (si->row); } else { -- cgit