diff options
Diffstat (limited to 'src/PlaylistSave.cxx')
-rw-r--r-- | src/PlaylistSave.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PlaylistSave.cxx b/src/PlaylistSave.cxx index 875fb1eeb..78a8fdb91 100644 --- a/src/PlaylistSave.cxx +++ b/src/PlaylistSave.cxx @@ -114,13 +114,16 @@ playlist_load_spl(struct playlist &playlist, PlayerControl &pc, end_index = contents.size(); const SongLoader loader(nullptr, nullptr); + Error error2; for (unsigned i = start_index; i < end_index; ++i) { const auto &uri_utf8 = contents[i]; - if ((playlist.AppendURI(pc, loader, uri_utf8.c_str())) != PlaylistResult::SUCCESS) - FormatError(playlist_domain, - "can't add file \"%s\"", uri_utf8.c_str()); + unsigned id = playlist.AppendURI(pc, loader, uri_utf8.c_str(), + error2); + if (id == 0) + FormatError(error2, "can't add file \"%s\"", + uri_utf8.c_str()); } return true; |