diff --git a/NEWS b/NEWS index faf11c231..334cce603 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.21.16 (not yet released) +* update + - fix crash when music_directory is not a directory ver 0.21.15 (2019/09/25) * decoder diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index c13d6fd40..e2c9b7a8c 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -493,6 +493,12 @@ UpdateWalk::Walk(Directory &root, const char *path, bool discard) noexcept if (!GetInfo(storage, "", info)) return false; + if (!info.IsDirectory()) { + FormatError(update_domain, "Not a directory: %s", + storage.MapUTF8("").c_str()); + return false; + } + ExcludeList exclude_list; UpdateDirectory(root, exclude_list, info);