changeset 2994:750c530b1bf5 trunk

playlist_dir_find_files(): Return list of URIs.
author William Pitcock <nenolod@atheme-project.org>
date Fri, 06 Jul 2007 01:12:17 -0500
parents 83727fbfec54
children 934c1a79904f
files src/audacious/playlist.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/playlist.c	Fri Jul 06 01:08:15 2007 -0500
+++ b/src/audacious/playlist.c	Fri Jul 06 01:12:17 2007 -0500
@@ -836,6 +836,7 @@
 
     g_hash_table_insert(htab, devino, GINT_TO_POINTER(1));
 
+    /* XXX: what the hell is this for? --nenolod */
     if ((ilist = input_scan_dir(path))) {
         GList *node;
         for (node = ilist; node; node = g_list_next(node)) {
@@ -851,12 +852,14 @@
         return NULL;
 
     while ((dir_entry = g_dir_read_name(dir))) {
-        gchar *filename;
+        gchar *filename, *tmp;
 
         if (file_is_hidden(dir_entry))
             continue;
 
-        filename = g_build_filename(path, dir_entry, NULL);
+        tmp = g_build_filename(path, dir_entry, NULL);
+        filename = g_filename_to_uri(tmp, NULL, NULL);
+        g_free(tmp);
 
         if (vfs_file_test(filename, G_FILE_TEST_IS_DIR)) {
             GList *sub;