# HG changeset patch # User Paul Marks # Date 1208059614 18000 # Node ID 539f3cb7b1e8284a017a479f959e3d14ce0be9ba # Parent db3a3f46a226c5a19dc014c4f455ca10f87f00d2 Fix relative paths in construct_uri() function. (Bugzilla #246) diff -r db3a3f46a226 -r 539f3cb7b1e8 src/audacious/util.c --- a/src/audacious/util.c Sat Apr 12 02:50:10 2008 +0300 +++ b/src/audacious/util.c Sat Apr 12 23:06:54 2008 -0500 @@ -1039,7 +1039,10 @@ // case 2: filename is not raw full path nor uri, playlist path is full path // make full path by replacing last part of playlist path with filename. (using g_build_filename) else if (playlist_name[0] == '/' || strstr(playlist_name, "://")) { - path = g_strdup(playlist_name); + path = g_filename_from_uri(playlist_name, NULL, NULL); + if (!path) { + path = g_strdup(playlist_name); + } tmp = strrchr(path, '/'); *tmp = '\0'; tmp = g_build_filename(path, filename, NULL); g_free(path); g_free(filename);