aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-12-05 04:31:48 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-12-05 04:31:48 +0800
commit71fbb45aa0a66ba86d26455926395c73da544647 (patch)
tree2ead9902968373b53034c4d6020d55d224aefdc5 /mail
parentba0792d8ffa88e2a9be12aa547fa9d8fc5257e5b (diff)
downloadgsoc2013-evolution-71fbb45aa0a66ba86d26455926395c73da544647.tar.gz
gsoc2013-evolution-71fbb45aa0a66ba86d26455926395c73da544647.tar.zst
gsoc2013-evolution-71fbb45aa0a66ba86d26455926395c73da544647.zip
Fixes bug #51618
2003-12-04 Jeffrey Stedfast <fejj@ximian.com> Fixes bug #51618 * mail-ops.c (empty_trash_empty): Get the proper local folders store uri (it's not file:/ anymore). svn path=/trunk/; revision=23636
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c18
-rw-r--r--mail/mail-tools.c1
3 files changed, 18 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1cc5c95a6f..d2706af1fb 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2003-12-04 Jeffrey Stedfast <fejj@ximian.com>
+ Fixes bug #51618
+
+ * mail-ops.c (empty_trash_empty): Get the proper local folders
+ store uri (it's not file:/ anymore).
+
Fixes bug #51605.
* em-folder-selector.c (emfs_response): Handle creating a new
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 7174ea1b71..1f5e75cb42 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1689,15 +1689,23 @@ static char *empty_trash_desc(struct _mail_msg *mm, int done)
static void empty_trash_empty(struct _mail_msg *mm)
{
struct _empty_trash_msg *m = (struct _empty_trash_msg *)mm;
+ const char *evolution_dir;
CamelFolder *trash;
-
- if (m->account)
+ char *uri;
+
+ if (m->account) {
trash = mail_tool_get_trash (m->account->source->url, FALSE, &mm->ex);
- else
- trash = mail_tool_get_trash ("file:/", TRUE, &mm->ex);
+ } else {
+ evolution_dir = mail_component_peek_base_directory (mail_component_peek ());
+ uri = g_strdup_printf ("mbox:%s/mail/local", evolution_dir);
+ trash = mail_tool_get_trash (uri, TRUE, &mm->ex);
+ g_free (uri);
+ }
+
if (trash)
camel_folder_expunge (trash, &mm->ex);
- camel_object_unref(trash);
+
+ camel_object_unref (trash);
}
static void empty_trash_emptied(struct _mail_msg *mm)
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index f77a86a7ac..50b2d0ab12 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -302,7 +302,6 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex)
g_return_val_if_fail (uri != NULL, NULL);
- /* This hack is still needed for file:/ since it's its own EvolutionStorage type */
if (!strncmp (uri, "vtrash:", 7))
offset = 7;
else if (!strncmp (uri, "vjunk:", 6))