PlaylistFile: throw exception on spl_map_to_fs() failure

This commit is contained in:
Max Kellermann
2015-12-26 06:30:25 +01:00
parent db5a691693
commit 1f184f4aec
8 changed files with 102 additions and 154 deletions

View File

@@ -141,19 +141,16 @@ PrintSongDetails(Response &r, Partition &partition, const char *uri_utf8)
#endif
bool
void
spl_print(Response &r, Partition &partition,
const char *name_utf8, bool detail,
Error &error)
const char *name_utf8, bool detail)
{
#ifndef ENABLE_DATABASE
(void)partition;
(void)detail;
#endif
PlaylistFileContents contents = LoadPlaylistFile(name_utf8, error);
if (contents.empty() && error.IsDefined())
return false;
PlaylistFileContents contents = LoadPlaylistFile(name_utf8);
for (const auto &uri_utf8 : contents) {
#ifdef ENABLE_DATABASE
@@ -162,6 +159,4 @@ spl_print(Response &r, Partition &partition,
#endif
r.Format(SONG_FILE "%s\n", uri_utf8.c_str());
}
return true;
}