Mercurial > audlegacy
changeset 4451:539f3cb7b1e8
Fix relative paths in construct_uri() function. (Bugzilla #246)
author | Paul Marks <paul@pmarks.net> |
---|---|
date | Sat, 12 Apr 2008 23:06:54 -0500 |
parents | db3a3f46a226 |
children | d60f2ae80959 |
files | src/audacious/util.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);