[evolution] Bug #633371 - Remote pop folder no longer emptied
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug #633371 - Remote pop folder no longer emptied
- Date: Fri, 29 Oct 2010 07:09:18 +0000 (UTC)
commit 95d422b0c016e4b8c60100dc47b2e70ad6b2757a
Author: Milan Crha <mcrha redhat com>
Date: Fri Oct 29 09:08:52 2010 +0200
Bug #633371 - Remote pop folder no longer emptied
mail/em-folder-tree.c | 2 +-
mail/em-folder-utils.c | 6 +++---
mail/mail-ops.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index b08da8c..1a40973 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1831,7 +1831,7 @@ folder_tree_drop_async__exec (struct _DragDataReceivedAsync *m,
em_utils_selection_get_uidlist (
m->selection, m->session, folder, m->move,
cancellable, error);
- m->moved = m->move && (error == NULL);
+ m->moved = m->move && (!error || !*error);
break;
case DND_DROP_TYPE_MESSAGE_RFC822:
/* import a message/rfc822 stream */
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index d457e90..c2720fc 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -153,7 +153,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
camel_store_rename_folder_sync (
m->fromstore, info->full_name, toname->str,
cancellable, error);
- if (error != NULL)
+ if (error && *error)
goto exception;
/* this folder no longer exists, unsubscribe it */
@@ -185,7 +185,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
cancellable, error);
camel_folder_free_uids (fromfolder, uids);
- if (m->delete && error == NULL)
+ if (m->delete && (!error || !*error))
camel_folder_synchronize_sync (
fromfolder, TRUE,
NULL, NULL);
@@ -195,7 +195,7 @@ emft_copy_folders__exec (struct _EMCopyFolders *m,
}
}
- if (error != NULL)
+ if (error && *error)
goto exception;
else if (m->delete && !deleted)
deleting = g_list_prepend (deleting, info);
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 88e327b..ffaa7e4 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -244,7 +244,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
if (!strncmp (m->source_uri, "mbox:", 5)) {
gchar *path = mail_tool_do_movemail (m->source_uri, error);
- if (path && error == NULL) {
+ if (path && (!error || !*error)) {
camel_folder_freeze (fm->destination);
camel_filter_driver_set_default_folder (
fm->driver, fm->destination);
@@ -253,7 +253,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
cancellable, error);
camel_folder_thaw (fm->destination);
- if (error == NULL)
+ if (!error || !*error)
g_unlink (path);
}
g_free (path);
@@ -301,7 +301,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
camel_uid_cache_save (cache);
}
- if (fm->delete && error == NULL) {
+ if (fm->delete && (!error || !*error)) {
/* not keep on server - just delete all the actual messages on the server */
for (i=0;i<folder_uids->len;i++) {
d(printf("force delete uid '%s'\n", (gchar *)folder_uids->pdata[i]));
@@ -309,7 +309,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m,
}
}
- if ((fm->delete || cache_uids) && error == NULL) {
+ if ((fm->delete || cache_uids) && (!error || !*error)) {
/* expunge messages (downloaded so far) */
/* FIXME Not passing a GCancellable or GError here. */
camel_folder_synchronize_sync (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]