TagAny: pass std::string_view to uri_has_scheme()

This commit is contained in:
Max Kellermann 2022-08-09 11:43:33 +02:00
parent 6239b6c0e2
commit 50a4d7169e
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ TagScanDatabase(Client &client, const char *uri, TagHandler &handler)
{
const auto absolute_uri = storage->MapUTF8(uri);
if (uri_has_scheme(absolute_uri.c_str()))
if (uri_has_scheme(absolute_uri))
return TagScanStream(absolute_uri.c_str(), handler);
}

View File

@ -348,7 +348,7 @@ handle_getfingerprint(Client &client, Request args, Response &)
lu.path = storage->MapFS(lu.canonical_uri);
if (lu.path.IsNull()) {
uri = storage->MapUTF8(lu.canonical_uri);
if (!uri_has_scheme(uri.c_str()))
if (!uri_has_scheme(uri))
throw ProtocolError(ACK_ERROR_NO_EXIST, "No such song");
}
}