aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/song.c')
-rw-r--r--src/song.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/song.c b/src/song.c
index 9cbd859f5..b56c798cb 100644
--- a/src/song.c
+++ b/src/song.c
@@ -176,16 +176,14 @@ song_file_update_inarchive(struct song *song)
}
char *
-song_get_url(const struct song *song, char *path_max_tmp)
+song_get_uri(const struct song *song)
{
assert(song != NULL);
assert(*song->url);
if (!song_in_database(song) || directory_is_root(song->parent))
- strcpy(path_max_tmp, song->url);
+ return g_strdup(song->url);
else
- pfx_dir(path_max_tmp, song->url, strlen(song->url),
- directory_get_path(song->parent),
- strlen(directory_get_path(song->parent)));
- return path_max_tmp;
+ return g_strconcat(directory_get_path(song->parent),
+ "/", song->url, NULL);
}