[evolution-ews] Bug #708628 - Add support for EmptyFolder operation



commit da9258817f198531ff0466dc5b4a9b5074ea73aa
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Fri Sep 27 17:08:08 2013 +0200

    Bug #708628 - Add support for EmptyFolder operation
    
    Don't replace DeleteFolder by EmptyFolder
    
    Although the behavior seems the same in EWS usage, it's not the
    same according with our tests (that are being implemented).
    Let's skip the usage for now and use it properly in the future.

 src/camel/camel-ews-store.c    |   18 +++++-------------
 src/collection/e-ews-backend.c |   12 +++---------
 2 files changed, 8 insertions(+), 22 deletions(-)
---
diff --git a/src/camel/camel-ews-store.c b/src/camel/camel-ews-store.c
index 29e4809..3afda8e 100644
--- a/src/camel/camel-ews-store.c
+++ b/src/camel/camel-ews-store.c
@@ -2027,19 +2027,11 @@ ews_delete_folder_sync (CamelStore *store,
 
                connection = camel_ews_store_ref_connection (ews_store);
 
-               if (e_ews_connection_satisfies_server_version (connection, E_EWS_EXCHANGE_2010)) {
-                       success = e_ews_connection_empty_folder_sync (
-                               connection,
-                               EWS_PRIORITY_MEDIUM,
-                               fid, FALSE, "HardDelete", TRUE,
-                               cancellable, &local_error);
-               } else {
-                       success = e_ews_connection_delete_folder_sync (
-                               connection,
-                               EWS_PRIORITY_MEDIUM,
-                               fid, FALSE, "HardDelete",
-                               cancellable, &local_error);
-               }
+               success = e_ews_connection_delete_folder_sync (
+                       connection,
+                       EWS_PRIORITY_MEDIUM,
+                       fid, FALSE, "HardDelete",
+                       cancellable, &local_error);
 
                g_object_unref (connection);
        }
diff --git a/src/collection/e-ews-backend.c b/src/collection/e-ews-backend.c
index 88216dd..26c50b5 100644
--- a/src/collection/e-ews-backend.c
+++ b/src/collection/e-ews-backend.c
@@ -910,15 +910,9 @@ ews_backend_delete_resource_sync (ECollectionBackend *backend,
 
                folder_id = e_source_ews_folder_dup_id (extension);
 
-               if (e_ews_connection_satisfies_server_version (connection, E_EWS_EXCHANGE_2010)) {
-                       success = e_ews_connection_empty_folder_sync (
-                               connection, EWS_PRIORITY_MEDIUM, folder_id,
-                               FALSE, "HardDelete", TRUE, cancellable, error);
-               } else {
-                       success = e_ews_connection_delete_folder_sync (
-                               connection, EWS_PRIORITY_MEDIUM, folder_id,
-                               FALSE, "HardDelete", cancellable, error);
-               }
+               success = e_ews_connection_delete_folder_sync (
+                       connection, EWS_PRIORITY_MEDIUM, folder_id,
+                       FALSE, "HardDelete", cancellable, error);
 
                g_free (folder_id);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]