aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/directory_save.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index a6deae06a..afdd66c49 100644
--- a/NEWS
+++ b/NEWS
@@ -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);