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 /src | |
parent | d4b00ff11cf102d8982ef342371acfa16ed2e515 (diff) | |
download | mpd-v0.15.x.tar.gz mpd-v0.15.x.tar.xz mpd-v0.15.x.zip |
directory_save: fix assertion failure on space-only directory namev0.15.x
Diffstat (limited to 'src')
-rw-r--r-- | src/directory_save.c | 8 |
1 files changed, 8 insertions, 0 deletions
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); |