diff options
author | Max Kellermann <max@duempel.org> | 2011-05-09 21:48:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-05-09 21:48:31 +0200 |
commit | 5d06236acb3f4b4420d825c8931b5b7447d845c4 (patch) | |
tree | 21095b7c3a0b9c1d96b1086eb1dc1664a86f7c6d | |
parent | d4b00ff11cf102d8982ef342371acfa16ed2e515 (diff) | |
download | mpd-5d06236acb3f4b4420d825c8931b5b7447d845c4.tar.gz mpd-5d06236acb3f4b4420d825c8931b5b7447d845c4.tar.xz mpd-5d06236acb3f4b4420d825c8931b5b7447d845c4.zip |
directory_save: fix assertion failure on space-only directory namev0.15.x
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/directory_save.c | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,7 @@ ver 0.15.17 (2011/??/??) - vorbis: reset the Ogg stream after flush * decoders: - vorbis: fix tremor support +* database: fix assertion failure on space-only directory name ver 0.15.16 (2011/03/13) diff --git a/src/directory_save.c b/src/directory_save.c index 132508447..d768a36c8 100644 --- a/src/directory_save.c +++ b/src/directory_save.c @@ -126,6 +126,14 @@ directory_load(FILE *fp, struct directory *directory, GError **error) return false; } + if (*name == 0) + /* workaround: a base name that + consists only of spaces is cleared + by g_strchomp(), and that may cause + an assertion failure in + directory_new() */ + continue; + subdir = directory_get_child(directory, name); if (subdir != NULL) { assert(subdir->parent == directory); |