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().
This commit is contained in:
Max Kellermann 2009-02-12 18:57:12 +01:00
parent a06e281421
commit 16bab6019b
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -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)

View File

@ -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;
}