void-packages/srcpkgs/evolution-data-server/patches/d845d321532ea80a8e204c0d97d...

46 lines
1.6 KiB
Diff

From d845d321532ea80a8e204c0d97dd06771c9d4646 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 9 Apr 2024 17:11:16 +0200
Subject: [PATCH] I#534 - Google Task stale item cannot be deleted
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/534
---
src/calendar/backends/gtasks/e-cal-backend-gtasks.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/calendar/backends/gtasks/e-cal-backend-gtasks.c b/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
index 81bb18d8c6..ff3e255d25 100644
--- a/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
+++ b/src/calendar/backends/gtasks/e-cal-backend-gtasks.c
@@ -883,6 +883,7 @@ ecb_gtasks_remove_component_sync (ECalMetaBackend *meta_backend,
GError **error)
{
ECalBackendGTasks *cbgtasks;
+ GError *local_error = NULL;
gboolean success;
g_return_val_if_fail (E_IS_CAL_BACKEND_GTASKS (meta_backend), FALSE);
@@ -893,10 +894,18 @@ ecb_gtasks_remove_component_sync (ECalMetaBackend *meta_backend,
g_rec_mutex_lock (&cbgtasks->priv->conn_lock);
- success = e_gdata_session_tasks_delete_sync (cbgtasks->priv->gdata, cbgtasks->priv->tasklist_id, uid, cancellable, error);
+ success = e_gdata_session_tasks_delete_sync (cbgtasks->priv->gdata, cbgtasks->priv->tasklist_id, uid, cancellable, &local_error);
g_rec_mutex_unlock (&cbgtasks->priv->conn_lock);
+ if (g_error_matches (local_error, E_SOUP_SESSION_ERROR, SOUP_STATUS_NOT_FOUND)) {
+ g_clear_error (&local_error);
+ success = TRUE;
+ }
+
+ if (local_error)
+ g_propagate_error (error, local_error);
+
return success;
}
--
GitLab