aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.cxx
diff options
context:
space:
mode:
authorDenis Krjuchkov <denis@crazydev.net>2013-01-24 02:26:38 +0600
committerDenis Krjuchkov <denis@crazydev.net>2013-01-28 00:13:45 +0600
commit3c7cf94643bc45237d1e61c4e6015d498e4400b0 (patch)
treebe93d9088f7b8199b0d07cce56017e6726a47f76 /src/PlaylistFile.cxx
parent3bd35d188320f20a98a1004c001b132fc0975437 (diff)
downloadmpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.gz
mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.tar.xz
mpd-3c7cf94643bc45237d1e61c4e6015d498e4400b0.zip
Path: convert fs_charset_to_utf8() to static method Path::ToUTF8()
Diffstat (limited to '')
-rw-r--r--src/PlaylistFile.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx
index 5e869d9db..daec5ca0a 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -163,13 +163,12 @@ LoadPlaylistFileInfo(PlaylistInfo &info,
char *name = g_strndup(name_fs,
name_length + 1 - sizeof(PLAYLIST_FILE_SUFFIX));
- char *name_utf8 = fs_charset_to_utf8(name);
+ std::string name_utf8 = Path::ToUTF8(name);
g_free(name);
- if (name_utf8 == NULL)
+ if (name_utf8.empty())
return false;
- info.name = name_utf8;
- g_free(name_utf8);
+ info.name = std::move(name_utf8);
info.mtime = st.st_mtime;
return true;
}