[gnome-documents] Revert "zpj-miner: don't descend into folders that didn't change"



commit c9e2d85998b65e6cbdf73c48665b1feb724cac36
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Oct 1 21:10:29 2012 -0400

    Revert "zpj-miner: don't descend into folders that didn't change"
    
    Unfortunately this doesn't really work - for the way we clean up deleted
    resources we need to have a complete list. We could query the missing
    pieces from the database, but the fact that we would have to recurse
    with a query roundtrip each time makes me wonder if it's worth it.
    For now, just revert the commit.
    
    This reverts commit 68c88e8f5627835644fd916d3966d9842a2fd7a4.

 src/miner/gd-zpj-miner.c |   29 ++++++-----------------------
 1 files changed, 6 insertions(+), 23 deletions(-)
---
diff --git a/src/miner/gd-zpj-miner.c b/src/miner/gd-zpj-miner.c
index eb18923..f9f598b 100644
--- a/src/miner/gd-zpj-miner.c
+++ b/src/miner/gd-zpj-miner.c
@@ -32,7 +32,6 @@ G_DEFINE_TYPE (GdZpjMiner, gd_zpj_miner, GD_TYPE_MINER)
 static gboolean
 account_miner_job_process_entry (GdAccountMinerJob *job,
                                  ZpjSkydriveEntry *entry,
-                                 gboolean *entry_updated,
                                  GError **error)
 {
   GDateTime *created_time, *updated_time;
@@ -197,9 +196,6 @@ account_miner_job_process_entry (GdAccountMinerJob *job,
   if (*error != NULL)
     return FALSE;
 
-  if (entry_updated)
-    *entry_updated = mtime_changed;
-
   return TRUE;
 }
 
@@ -222,31 +218,18 @@ account_miner_job_traverse_folder (GdAccountMinerJob *job,
       ZpjSkydriveEntry *entry = (ZpjSkydriveEntry *) l->data;
       const gchar *id;
 
+      id = zpj_skydrive_entry_get_id (entry);
+
       if (ZPJ_IS_SKYDRIVE_FOLDER (entry))
         {
-          gboolean entry_updated;
-          account_miner_job_process_entry (job, entry, &entry_updated, error);
-
-          if (*error != NULL)
-            goto out;
-
-          if (entry_updated)
-            {
-              id = zpj_skydrive_entry_get_id (entry);
-              account_miner_job_traverse_folder (job, id, error);
-            }
-
+          account_miner_job_traverse_folder (job, id, error);
           if (*error != NULL)
             goto out;
         }
       else if (ZPJ_IS_SKYDRIVE_PHOTO (entry))
-        {
-          continue;
-        }
-      else
-        {
-          account_miner_job_process_entry (job, entry, NULL, error);
-        }
+        continue;
+
+      account_miner_job_process_entry (job, entry, error);
 
       if (*error != NULL)
         {



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