# HG changeset patch # User Giacomo Lozito # Date 1184522541 -7200 # Node ID 72766f2e8713c2088103c0344dd61dde671e1981 # Parent 407395e030c7e36ce3b453c9e67e686bf9eef036 recursive directory scan for add file dialog works again diff -r 407395e030c7 -r 72766f2e8713 src/audacious/playlist.c --- a/src/audacious/playlist.c Sat Jul 14 14:56:38 2007 -0500 +++ b/src/audacious/playlist.c Sun Jul 15 20:02:21 2007 +0200 @@ -823,6 +823,9 @@ struct stat statbuf; DeviceInode *devino; + if (!path) + return NULL; + if (!vfs_file_test(path, G_FILE_TEST_IS_DIR)) return NULL; @@ -848,6 +851,7 @@ return list; } + /* g_dir_open does not handle URI, so path should come here not-urified. --giacomo */ if (!(dir = g_dir_open(path, 0, NULL))) return NULL; @@ -863,7 +867,9 @@ if (vfs_file_test(filename, G_FILE_TEST_IS_DIR)) { GList *sub; - sub = playlist_dir_find_files(filename, background, htab); + gchar *dirfilename = g_filename_from_uri(filename, NULL, NULL); + sub = playlist_dir_find_files(dirfilename, background, htab); + g_free(dirfilename); g_free(filename); list = g_list_concat(list, sub); }