Commit c95f0820 authored by Max Kellermann's avatar Max Kellermann

TagFile: convert suffix to UTF-8

parent 830a1bd1
...@@ -87,11 +87,13 @@ tag_file_scan(Path path_fs, const tag_handler &handler, void *handler_ctx) ...@@ -87,11 +87,13 @@ tag_file_scan(Path path_fs, const tag_handler &handler, void *handler_ctx)
/* check if there's a suffix and a plugin */ /* check if there's a suffix and a plugin */
const char *suffix = path_fs.GetSuffix(); const auto *suffix = path_fs.GetSuffix();
if (suffix == nullptr) if (suffix == nullptr)
return false; return false;
TagFileScan tfs(path_fs, suffix, handler, handler_ctx); const auto suffix_utf8 = Path::FromFS(suffix).ToUTF8();
TagFileScan tfs(path_fs, suffix_utf8.c_str(), handler, handler_ctx);
return decoder_plugins_try([&](const DecoderPlugin &plugin){ return decoder_plugins_try([&](const DecoderPlugin &plugin){
return tfs.Scan(plugin); return tfs.Scan(plugin);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment