[tracker-miners/wip/carlosg/delay-monitors: 19/19] tracker: Delete database location directories on reset




commit 26534fe1a741b05686d3a591e98201454e52e531
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Nov 8 21:57:16 2020 +0100

    tracker: Delete database location directories on reset
    
    This complements the first-index check that looks for the cache dir
    existing.

 src/tracker/tracker-reset.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/tracker/tracker-reset.c b/src/tracker/tracker-reset.c
index 3080d93e7..d13ec7fcc 100644
--- a/src/tracker/tracker-reset.c
+++ b/src/tracker/tracker-reset.c
@@ -203,6 +203,8 @@ reset_run (void)
                location = g_file_new_for_path (dir);
                delete_location_content (location);
                g_object_unref (location);
+
+               g_rmdir (dir);
                g_free (dir);
        }
 
@@ -214,6 +216,7 @@ reset_run (void)
                cache_location = g_file_new_for_path (dir);
                delete_location_content (cache_location);
                g_object_unref (cache_location);
+               g_rmdir (dir);
                g_free (dir);
        }
 


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