diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-06-22 02:22:21 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-06-22 02:22:21 +0800 |
commit | d0f4337af73020dbc19ecbeac76e44ae19662576 (patch) | |
tree | c172f8b0c3eb3bb510d3694393f0abab36845cc8 /camel | |
parent | 4907469fb04fb79811724df20921675b72fe8915 (diff) | |
download | gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.gz gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.bz2 gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.lz gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.xz gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.zst gsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.zip |
When determining a mailboxe's folder_file_path et aluse its basename to prevent the triple-slash filenames (~/ev/inbox///movemail.ibex)
svn path=/trunk/; revision=3679
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/providers/mbox/camel-mbox-folder.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ba8d9e709a..92f6cf142e 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2000-06-21 Peter Williams <peterw@curious-george.helixcode.com> + + * providers/mbox/camel-mbox-folder.c (mbox_init): Use the basename + of the mailbox so we don't get pathnames like ~/evolution/inbox///movemail.ibex + 2000-06-21 Dan Winship <danw@helixcode.com> * camel-folder-summary.c (message_info_new): Set date_received diff --git a/camel/providers/mbox/camel-mbox-folder.c b/camel/providers/mbox/camel-mbox-folder.c index 97ba44180a..fb0434af41 100644 --- a/camel/providers/mbox/camel-mbox-folder.c +++ b/camel/providers/mbox/camel-mbox-folder.c @@ -171,6 +171,7 @@ mbox_init (CamelFolder *folder, CamelStore *parent_store, { CamelMboxFolder *mbox_folder = (CamelMboxFolder *)folder; const gchar *root_dir_path; + gchar *real_name; int forceindex; struct stat st; @@ -205,10 +206,11 @@ mbox_init (CamelFolder *folder, CamelStore *parent_store, root_dir_path = camel_mbox_store_get_toplevel_dir (CAMEL_MBOX_STORE(folder->parent_store)); - mbox_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, folder->full_name); - mbox_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, folder->full_name); - mbox_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, folder->full_name); - mbox_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, folder->full_name); + real_name = g_basename (folder->full_name); + mbox_folder->folder_file_path = g_strdup_printf ("%s/%s", root_dir_path, real_name); + mbox_folder->summary_file_path = g_strdup_printf ("%s/%s-ev-summary", root_dir_path, real_name); + mbox_folder->folder_dir_path = g_strdup_printf ("%s/%s.sdb", root_dir_path, real_name); + mbox_folder->index_file_path = g_strdup_printf ("%s/%s.ibex", root_dir_path, real_name); /* if we have no index file, force it */ forceindex = stat(mbox_folder->index_file_path, &st) == -1; |