db/update/Walk: use GetFilenameSuffix() instead of uri_get_suffix()
Unlike GetFilenameSuffix(), uri_get_suffix() removes the query string first, which breaks file names with question marks in the name. Therefore, uri_get_suffix() shall only be applied to remote URIs. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1316
This commit is contained in:
@@ -224,10 +224,12 @@ GetChromaprintCommand::DecodeFile(std::string_view suffix, InputStream &is,
|
||||
inline void
|
||||
GetChromaprintCommand::DecodeFile()
|
||||
{
|
||||
const auto suffix = uri_get_suffix(uri);
|
||||
if (suffix.empty())
|
||||
const char *_suffix = PathTraitsUTF8::GetFilenameSuffix(uri.c_str());
|
||||
if (_suffix == nullptr)
|
||||
return;
|
||||
|
||||
const std::string_view suffix{_suffix};
|
||||
|
||||
InputStreamPtr input_stream;
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user