aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/mail-ops.c')
-rw-r--r--libemail-engine/mail-ops.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libemail-engine/mail-ops.c b/libemail-engine/mail-ops.c
index df90596e53..406d3d6462 100644
--- a/libemail-engine/mail-ops.c
+++ b/libemail-engine/mail-ops.c
@@ -245,7 +245,6 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
CamelSettings *settings;
CamelStore *parent_store;
CamelUIDCache *cache = NULL;
- CamelURL *url;
gboolean keep = TRUE;
gboolean delete_fetched;
gboolean is_local_delivery = FALSE;
@@ -281,15 +280,16 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
/* Just for readability. */
delete_fetched = !keep;
- url = camel_service_new_camel_url (service);
- is_local_delivery = em_utils_is_local_delivery_mbox_file (url);
-
- if (is_local_delivery) {
+ if (em_utils_is_local_delivery_mbox_file (service)) {
+ CamelURL *url;
gchar *path;
gchar *url_string;
path = mail_tool_do_movemail (m->store, error);
+
+ url = camel_service_new_camel_url (service);
url_string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
+ camel_url_free (url);
if (path && (!error || !*error)) {
camel_folder_freeze (fm->destination);
@@ -306,6 +306,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
g_free (path);
g_free (url_string);
+
} else {
uid = camel_service_get_uid (service);
if (m->provider_lock)
@@ -316,8 +317,6 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
fm->session, uid, cancellable, error);
}
- camel_url_free (url);
-
if (folder == NULL)
goto exit;