Mercurial > audlegacy-plugins
diff src/madplug/input.c @ 1277:e7cd962732cb
file_name and file_path in a tuple should be unescaped.
| author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
|---|---|
| date | Mon, 16 Jul 2007 16:16:41 +0900 |
| parents | e46b98155d5d |
| children | 38fb3bb3e21e |
line wrap: on
line diff
--- a/src/madplug/input.c Mon Jul 16 00:24:09 2007 +0200 +++ b/src/madplug/input.c Mon Jul 16 16:16:41 2007 +0900 @@ -352,6 +352,7 @@ static void input_read_tag(struct mad_info_t *info) { gchar *string = NULL; + gchar *realfn = NULL; TitleInput *title_input; glong curpos = 0; @@ -425,9 +426,11 @@ g_free(string); string = NULL; } - - title_input->file_name = g_strdup(g_basename(info->filename)); - title_input->file_path = g_path_get_dirname(info->filename); + + realfn = g_filename_from_uri(info->filename, NULL, NULL); + title_input->file_name = g_strdup(g_basename(realfn ? realfn : info->filename)); + title_input->file_path = g_path_get_dirname(realfn ? realfn : info->filename); + g_free(realfn); realfn = NULL; if ((string = strrchr(title_input->file_name, '.'))) { title_input->file_ext = string + 1; *string = '\0'; // make filename end at dot.
