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:
@@ -188,8 +188,8 @@ UpdateWalk::UpdateRegularFile(Directory &directory,
|
||||
const char *name,
|
||||
const StorageFileInfo &info) noexcept
|
||||
{
|
||||
const auto suffix = uri_get_suffix(name);
|
||||
if (suffix.empty())
|
||||
const char *suffix = PathTraitsUTF8::GetFilenameSuffix(name);
|
||||
if (suffix == nullptr)
|
||||
return false;
|
||||
|
||||
return UpdateSongFile(directory, name, suffix, info) ||
|
||||
|
||||
Reference in New Issue
Block a user