From b233c145fa28f2a9e90a40993bc35f408d256e08 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 25 Jul 2010 13:18:57 +0200 Subject: {queue,song}_print: print relative paths if possible If a song with an absolute path points inside the music directory, print only the relative part. This happens when partial songs from a playlist file were loaded. --- src/song_print.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/song_print.c') diff --git a/src/song_print.c b/src/song_print.c index 11b241fbc..16239e03b 100644 --- a/src/song_print.c +++ b/src/song_print.c @@ -25,6 +25,7 @@ #include "tag_print.h" #include "client.h" #include "uri.h" +#include "mapper.h" void song_print_uri(struct client *client, struct song *song) @@ -40,7 +41,8 @@ song_print_uri(struct client *client, struct song *song) if (uri == NULL) uri = song->uri; - client_printf(client, "%s%s\n", SONG_FILE, uri); + client_printf(client, "%s%s\n", SONG_FILE, + map_to_relative_path(uri)); g_free(allocated); } -- cgit v1.2.3