From 052f74f4db45219d731e7af6dcb9beb5eec2344c Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Tue, 17 Aug 2010 23:57:38 +0200 Subject: Use relative paths when interacting with the music_* functions. --- commands.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commands.c') diff --git a/commands.c b/commands.c index 8a9efff..d4b15f3 100644 --- a/commands.c +++ b/commands.c @@ -160,9 +160,11 @@ static void commands_get_mp3(GSocketConnection *connection, const gchar *cmd) { goto commands_get_mp3_free_path; } + gchar *full_path = music_get_full_path(path); GOutputStream *os = g_io_stream_get_output_stream((GIOStream*)connection); - GFile *file = g_file_new_for_path(path); + GFile *file = g_file_new_for_path(full_path); GFileInputStream *is = g_file_read(file, NULL, &error); + g_free(full_path); if(is == NULL) { g_warning(error->message); -- cgit v1.2.3