From 17197ae1f495aa492f09615d39d7eec14e163f5f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 12 Feb 2009 18:57:12 +0100 Subject: update: recursively purge deleted directories When a directory is deleted, MPD deleted only the directory from the database; it did not bother to walk the full tree to free all memory and to remove deleted songs from the playlist. Replace a dirvec_delete() with delete_directory(). --- src/update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/update.c b/src/update.c index 58f1b08d1..48ca0c437 100644 --- a/src/update.c +++ b/src/update.c @@ -192,7 +192,7 @@ removeDeletedFromDirectory(char *path_max_tmp, struct directory *directory) S_ISDIR(st.st_mode))) continue; LOG("removing directory: %s\n", dv->base[i]->path); - dirvec_delete(dv, dv->base[i]); + delete_directory(dv->base[i]); modified = true; } -- cgit v1.2.3