diff options
author | Denis Krjuchkov <denis@crazydev.net> | 2013-12-05 05:02:10 +0600 |
---|---|---|
committer | Denis Krjuchkov <denis@crazydev.net> | 2013-12-05 12:35:29 +0600 |
commit | dc554ca61f28a354ee0d9342e60339f7fc75a382 (patch) | |
tree | 4ffc4379ff61201be42fe60e0654a030f85f85ac /src/PlaylistSong.cxx | |
parent | cbb9149a82edf86102c37b20db98194179ed9eec (diff) | |
download | mpd-dc554ca61f28a354ee0d9342e60339f7fc75a382.tar.gz mpd-dc554ca61f28a354ee0d9342e60339f7fc75a382.tar.xz mpd-dc554ca61f28a354ee0d9342e60339f7fc75a382.zip |
PlaylistSong.cxx: don't use g_build_filename
Diffstat (limited to '')
-rw-r--r-- | src/PlaylistSong.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx index f6f602a3c..084f534ad 100644 --- a/src/PlaylistSong.cxx +++ b/src/PlaylistSong.cxx @@ -165,12 +165,14 @@ playlist_check_translate_song(Song *song, const char *base_uri, base_uri = nullptr; } - char *allocated = nullptr; - if (base_uri != nullptr) - uri = allocated = g_build_filename(base_uri, uri, nullptr); + std::string full_uri; + if (base_uri != nullptr) { + full_uri = PathTraitsUTF8::Build(base_uri, uri); + uri = full_uri.c_str(); + } Song *dest = playlist_check_load_song(song, uri, secure); song->Free(); - g_free(allocated); + return dest; } |