diff options
author | Max Kellermann <max@duempel.org> | 2013-10-21 10:26:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-21 10:50:22 +0200 |
commit | 83c726a34f325ae5be0d5b61b66a97cb41f6973e (patch) | |
tree | ff65ffc34bd655cce2a52b9e84d5a762ea0f021e /src/PlaylistPrint.cxx | |
parent | a0415f73d459b5763f59dfa4151ec89834d29526 (diff) |
GetBaseUTF8
Diffstat (limited to 'src/PlaylistPrint.cxx')
-rw-r--r-- | src/PlaylistPrint.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/PlaylistPrint.cxx b/src/PlaylistPrint.cxx index 35f360eec..01c3fc3b1 100644 --- a/src/PlaylistPrint.cxx +++ b/src/PlaylistPrint.cxx @@ -33,11 +33,10 @@ #include "Client.hxx" #include "InputStream.hxx" #include "Song.hxx" +#include "fs/Traits.hxx" #include "util/Error.hxx" #include "thread/Cond.hxx" -#include <glib.h> - void playlist_print_uris(Client &client, const playlist &playlist) { @@ -150,11 +149,14 @@ static void playlist_provider_print(Client &client, const char *uri, SongEnumerator &e, bool detail) { - Song *song; - char *base_uri = uri != nullptr ? g_path_get_dirname(uri) : nullptr; + const std::string base_uri = uri != nullptr + ? PathTraits::GetParentUTF8(uri) + : std::string("."); + Song *song; while ((song = e.NextSong()) != nullptr) { - song = playlist_check_translate_song(song, base_uri, false); + song = playlist_check_translate_song(song, base_uri.c_str(), + false); if (song == nullptr) continue; @@ -165,8 +167,6 @@ playlist_provider_print(Client &client, const char *uri, song->Free(); } - - g_free(base_uri); } bool |