aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-05 08:57:25 +0100
committerMax Kellermann <max@duempel.org>2015-03-05 10:07:07 +0100
commitc95f0820bcb8cffef8d03e73897edbf94fa1ad09 (patch)
treef5c08dcf4c0a2ee6d69c422754d686b57bf55b25 /src
parent830a1bd130f819adfef71c882a335e5405f3f02d (diff)
downloadmpd-c95f0820bcb8cffef8d03e73897edbf94fa1ad09.tar.gz
mpd-c95f0820bcb8cffef8d03e73897edbf94fa1ad09.tar.xz
mpd-c95f0820bcb8cffef8d03e73897edbf94fa1ad09.zip
TagFile: convert suffix to UTF-8
Diffstat (limited to 'src')
-rw-r--r--src/TagFile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/TagFile.cxx b/src/TagFile.cxx
index 168be6063..0640c132e 100644
--- a/src/TagFile.cxx
+++ b/src/TagFile.cxx
@@ -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 */
- const char *suffix = path_fs.GetSuffix();
+ const auto *suffix = path_fs.GetSuffix();
if (suffix == nullptr)
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 tfs.Scan(plugin);
});