PlaylistFile: "playlistadd" creates new playlist if it does not exist, as documented

This commit is contained in:
Max Kellermann 2017-01-16 20:55:19 +01:00
parent 5677278251
commit dcbab8e37a
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.20.3 (not yet released)
* protocol
- "playlistadd" creates new playlist if it does not exist, as documented
ver 0.20.2 (2017/01/15)
* input

View File

@ -335,7 +335,7 @@ try {
const auto path_fs = spl_map_to_fs(utf8path);
assert(!path_fs.IsNull());
FileOutputStream fos(path_fs, FileOutputStream::Mode::APPEND_EXISTING);
FileOutputStream fos(path_fs, FileOutputStream::Mode::APPEND_OR_CREATE);
if (fos.Tell() / (MPD_PATH_MAX + 1) >= playlist_max_length)
throw PlaylistError(PlaylistResult::TOO_LARGE,