db/update/ExcludeList: allow comments only at start of line

This commit is contained in:
Max Kellermann 2018-07-06 18:27:17 +02:00
parent d5c132fca0
commit 63406efcd8
2 changed files with 3 additions and 6 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ ver 0.20.21 (not yet released)
* database * database
- proxy: add "password" setting - proxy: add "password" setting
- proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort" - proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
- simple: allow .mpdignore comments only at start of line
* output * output
- httpd: remove broken DLNA support code - httpd: remove broken DLNA support code

View File

@ -38,12 +38,8 @@
inline void inline void
ExcludeList::ParseLine(char *line) noexcept ExcludeList::ParseLine(char *line) noexcept
{ {
char *p = strchr(line, '#'); char *p = Strip(line);
if (p != nullptr) if (*p != 0 && *p != '#')
*p = 0;
p = Strip(line);
if (*p != 0)
patterns.emplace_front(p); patterns.emplace_front(p);
} }