Mercurial > audlegacy
comparison src/audacious/playlist.c @ 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 | 72766f2e8713 |
comparison
equal
deleted
inserted
replaced
2993:83727fbfec54 | 2994:750c530b1bf5 |
---|---|
834 return NULL; | 834 return NULL; |
835 } | 835 } |
836 | 836 |
837 g_hash_table_insert(htab, devino, GINT_TO_POINTER(1)); | 837 g_hash_table_insert(htab, devino, GINT_TO_POINTER(1)); |
838 | 838 |
839 /* XXX: what the hell is this for? --nenolod */ | |
839 if ((ilist = input_scan_dir(path))) { | 840 if ((ilist = input_scan_dir(path))) { |
840 GList *node; | 841 GList *node; |
841 for (node = ilist; node; node = g_list_next(node)) { | 842 for (node = ilist; node; node = g_list_next(node)) { |
842 gchar *name = g_build_filename(path, node->data, NULL); | 843 gchar *name = g_build_filename(path, node->data, NULL); |
843 list = g_list_prepend(list, name); | 844 list = g_list_prepend(list, name); |
849 | 850 |
850 if (!(dir = g_dir_open(path, 0, NULL))) | 851 if (!(dir = g_dir_open(path, 0, NULL))) |
851 return NULL; | 852 return NULL; |
852 | 853 |
853 while ((dir_entry = g_dir_read_name(dir))) { | 854 while ((dir_entry = g_dir_read_name(dir))) { |
854 gchar *filename; | 855 gchar *filename, *tmp; |
855 | 856 |
856 if (file_is_hidden(dir_entry)) | 857 if (file_is_hidden(dir_entry)) |
857 continue; | 858 continue; |
858 | 859 |
859 filename = g_build_filename(path, dir_entry, NULL); | 860 tmp = g_build_filename(path, dir_entry, NULL); |
861 filename = g_filename_to_uri(tmp, NULL, NULL); | |
862 g_free(tmp); | |
860 | 863 |
861 if (vfs_file_test(filename, G_FILE_TEST_IS_DIR)) { | 864 if (vfs_file_test(filename, G_FILE_TEST_IS_DIR)) { |
862 GList *sub; | 865 GList *sub; |
863 sub = playlist_dir_find_files(filename, background, htab); | 866 sub = playlist_dir_find_files(filename, background, htab); |
864 g_free(filename); | 867 g_free(filename); |