Dominique Leuenberger
c57d9de3b0
- Add evolution-autoArchive-archives-Junk-and-Deleted-too.patch: AutoArchive archives Junk and Deleted messages too (bgo#795977). - Add evolution-alarm-notify-do-not-use-markup.patch: alarm-notify: Do not use markup around organizer name in libnotify text. OBS-URL: https://build.opensuse.org/request/show/611207 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/evolution?expand=0&rev=370
48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
From ccc936b4971a8f9a9be7f4712a5dd23813c936cf Mon Sep 17 00:00:00 2001
|
|
From: Milan Crha <mcrha@redhat.com>
|
|
Date: Mon, 14 May 2018 11:51:13 +0200
|
|
Subject: Bug 795977 - AutoArchive archives Junk and Deleted messages too
|
|
|
|
---
|
|
src/mail/em-utils.c | 11 ++++++++---
|
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/mail/em-utils.c b/src/mail/em-utils.c
|
|
index 0f604bd..fd39154 100644
|
|
--- a/src/mail/em-utils.c
|
|
+++ b/src/mail/em-utils.c
|
|
@@ -1803,12 +1803,16 @@ em_utils_process_autoarchive_sync (EMailBackend *mail_backend,
|
|
|
|
g_date_time_unref (now_time);
|
|
|
|
- search_sexp = g_strdup_printf ("(match-all (< (get-sent-date) %" G_GINT64_FORMAT "))", g_date_time_to_unix (use_time));
|
|
+ search_sexp = g_strdup_printf ("(match-all (and "
|
|
+ "(not (system-flag \"junk\")) "
|
|
+ "(not (system-flag \"deleted\")) "
|
|
+ "(< (get-sent-date) %" G_GINT64_FORMAT ")"
|
|
+ "))", g_date_time_to_unix (use_time));
|
|
uids = camel_folder_search_by_expression (folder, search_sexp, cancellable, error);
|
|
|
|
if (!uids) {
|
|
success = FALSE;
|
|
- } else {
|
|
+ } else if (uids->len > 0) {
|
|
gint ii;
|
|
|
|
if (aa_config == E_AUTO_ARCHIVE_CONFIG_MOVE_TO_ARCHIVE ||
|
|
@@ -1863,9 +1867,10 @@ em_utils_process_autoarchive_sync (EMailBackend *mail_backend,
|
|
|
|
camel_folder_thaw (folder);
|
|
}
|
|
+ }
|
|
|
|
+ if (uids)
|
|
camel_folder_search_free (folder, uids);
|
|
- }
|
|
|
|
g_free (search_sexp);
|
|
g_free (aa_custom_target_folder_uri);
|
|
--
|
|
cgit v0.12
|
|
|