From 16bab6019ba400edf15960f6a887702aa85008dd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 12 Feb 2009 18:57:12 +0100 Subject: [PATCH] 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(). --- NEWS | 1 + src/update.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index f1018bb22..8764db1b3 100644 --- a/NEWS +++ b/NEWS @@ -60,6 +60,7 @@ ver 0.14.2 (2009/??/??) - shout: clear buffer before calling the encoder * mapper: remove trailing slashes from music_directory * player: set player error when output device fails +* update: recursively purge deleted directories ver 0.14.1 (2009/01/17) diff --git a/src/update.c b/src/update.c index 216e40422..90b7cbe8f 100644 --- a/src/update.c +++ b/src/update.c @@ -225,7 +225,7 @@ removeDeletedFromDirectory(struct directory *directory) continue; g_debug("removing directory: %s", dv->base[i]->path); - dirvec_delete(dv, dv->base[i]); + delete_directory(dv->base[i]); modified = true; }