diff options
author | Denis Krjuchkov <denis@crazydev.net> | 2013-01-24 02:26:38 +0600 |
---|---|---|
committer | Denis Krjuchkov <denis@crazydev.net> | 2013-01-28 00:13:45 +0600 |
commit | 3c7cf94643bc45237d1e61c4e6015d498e4400b0 (patch) | |
tree | be93d9088f7b8199b0d07cce56017e6726a47f76 /src/Mapper.cxx | |
parent | 3bd35d188320f20a98a1004c001b132fc0975437 (diff) | |
download | mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.gz mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.xz mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.zip |
Path: convert fs_charset_to_utf8() to static method Path::ToUTF8()
Diffstat (limited to 'src/Mapper.cxx')
-rw-r--r-- | src/Mapper.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx index 1cb967eb6..fa5af2dba 100644 --- a/src/Mapper.cxx +++ b/src/Mapper.cxx @@ -246,7 +246,11 @@ map_fs_to_utf8(const char *path_fs) while (path_fs[0] == G_DIR_SEPARATOR) ++path_fs; - return fs_charset_to_utf8(path_fs); + const std::string path_utf8 = Path::ToUTF8(path_fs); + if (path_utf8.empty()) + return nullptr; + + return g_strdup(path_utf8.c_str()); } const Path & |