From d89c3d0a9c4ea8fc31cc7f980df48669511ccca3 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 17 Apr 2002 20:00:39 +0000 Subject: Just use g_basename. (mlf_finalize): Free the real_path. 2002-04-17 Jeffrey Stedfast * mail-local.c (mail_local_folder_construct): Just use g_basename. (mlf_finalize): Free the real_path. * folder-browser.c (on_right_click): Unref the GdkGC so we don't leak it. svn path=/trunk/; revision=16493 --- mail/mail-local.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mail/mail-local.c') diff --git a/mail/mail-local.c b/mail/mail-local.c index 1493866ba5..a90d4ae15f 100644 --- a/mail/mail-local.c +++ b/mail/mail-local.c @@ -555,6 +555,8 @@ mlf_finalize (CamelObject *obj) free_metainfo(mlf->meta); + g_free (mlf->real_path); + #ifdef ENABLE_THREADS g_mutex_free (mlf->real_folder_lock); #endif @@ -585,12 +587,9 @@ mail_local_folder_construct(MailLocalFolder *mlf, MailLocalStore *parent_store, { const char *name; char *metapath; - - name = strrchr(full_name, '/'); - if (name == NULL) - name = full_name; - name = name + 1; - + + name = g_basename (full_name); + d(printf("constructing local folder: full = %s, name = %s\n", full_name, name)); camel_folder_construct(CAMEL_FOLDER (mlf), CAMEL_STORE(parent_store), full_name, name); -- cgit