From 82b4ec22bee73966a29eb126024c9c337a3d4755 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Jan 2014 22:17:59 +0100 Subject: [PATCH] PlaylistSong: recurse after applying base_uri Allows applying map_to_relative_path() with base_uri. --- src/PlaylistSong.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PlaylistSong.cxx b/src/PlaylistSong.cxx index 3366559d5..50f18abe9 100644 --- a/src/PlaylistSong.cxx +++ b/src/PlaylistSong.cxx @@ -136,10 +136,10 @@ playlist_check_translate_song(DetachedSong *song, const char *base_uri, base_uri = nullptr; } - std::string full_uri; if (base_uri != nullptr) { - full_uri = PathTraitsUTF8::Build(base_uri, uri); - uri = full_uri.c_str(); + song->SetURI(PathTraitsUTF8::Build(base_uri, uri)); + /* repeat the above checks */ + return playlist_check_translate_song(song, nullptr, secure); } DetachedSong *dest = playlist_check_load_song(song, uri, secure);