From ca89b73daaab2098e63361a1ce457e4594517b1f Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 7 Feb 2010 13:47:05 +0100 Subject: Added recursive removal of missing files. --- wallpapers.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'wallpapers.c') diff --git a/wallpapers.c b/wallpapers.c index 86f7318..a4bfb60 100644 --- a/wallpapers.c +++ b/wallpapers.c @@ -168,6 +168,15 @@ void wallpapers_remove_missing(struct directory_t *dir, GtkStatusbar *statusbar, } g_array_free(array, TRUE); + if(recursive && db_get_directories(dir->dirid, &array)) { + for(int i = 0; i < array->len; i++) { + struct directory_t *subdir; + subdir = &g_array_index(array, struct directory_t, i); + wallpapers_remove_missing(subdir, statusbar, recursive); + } + g_array_free(array, TRUE); + } + gdk_threads_enter(); gtk_statusbar_pop(statusbar, context_id); gdk_threads_leave(); -- cgit v1.2.3