[gvfs/wip/oholy/google-cache-conservative: 33/39] google: Remove also dir_collisions entries



commit 2714228c41150d4746174f97ae849ccc949240e0
Author: Ondrej Holy <oholy redhat com>
Date:   Wed Aug 1 13:44:59 2018 +0200

    google: Remove also dir_collisions entries
    
    dir_collisions are not properly invalidated if removed entry is on this list.
    Let's remove the entry also from this list.

 daemon/gvfsbackendgoogle.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 80fbca99..47fc671f 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -519,6 +519,13 @@ remove_entry (GVfsBackendGoogle *self,
   g_hash_table_remove (self->dir_entries, k);
   dir_entries_key_free (k);
 
+  l = g_list_find (self->dir_collisions, entry);
+  if (l != NULL)
+    {
+      self->dir_collisions = g_list_remove_link (self->dir_collisions, l);
+      g_object_unref (entry);
+    }
+
   for (l = self->dir_collisions; l != NULL; l = l->next)
     {
       GDataEntry *colliding_entry = GDATA_ENTRY (l->data);


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