aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 4ee9110ae5..76148f70ec 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1413,12 +1413,21 @@ gboolean
em_utils_folder_is_outbox(CamelFolder *folder, const gchar *uri)
{
CamelFolder *local_outbox_folder;
+ const gchar *local_outbox_uri;
local_outbox_folder =
e_mail_local_get_folder (E_MAIL_FOLDER_OUTBOX);
/* <Highlander>There can be only one.</Highlander> */
- return folder == local_outbox_folder;
+ if (folder && folder == local_outbox_folder)
+ return TRUE;
+
+ if (!uri || !local_outbox_folder)
+ return FALSE;
+
+ local_outbox_uri = e_mail_local_get_folder_uri (E_MAIL_FOLDER_OUTBOX);
+
+ return camel_store_folder_uri_equal (local_outbox_folder->parent_store, local_outbox_uri, uri);
}
/**