aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-06-22 02:22:21 +0800
committerPeter Williams <peterw@src.gnome.org>2000-06-22 02:22:21 +0800
commitd0f4337af73020dbc19ecbeac76e44ae19662576 (patch)
treec172f8b0c3eb3bb510d3694393f0abab36845cc8
parent4907469fb04fb79811724df20921675b72fe8915 (diff)
downloadgsoc2013-evolution-d0f4337af73020dbc19ecbeac76e44ae19662576.tar.gz
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
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/providers/mbox/camel-mbox-folder.c10
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;