summaryrefslogtreecommitdiff
path: root/music.c
diff options
context:
space:
mode:
Diffstat (limited to 'music.c')
-rw-r--r--music.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/music.c b/music.c
index 09ee7d8..8852835 100644
--- a/music.c
+++ b/music.c
@@ -82,8 +82,16 @@ static struct directory *music_find_dir_rec(struct directory *root, const gchar
if(g_strcmp0(root->path, path) == 0)
return root;
- /* TODO: implement this */
- g_error("not implemented");
+ for(struct directory *d = root->sub; d; d = d->next) {
+ if(g_strcmp0(d->path, path) == 0) {
+ return d;
+ }
+
+ struct directory *temp = music_find_dir_rec(d, path);
+ if(temp) {
+ return temp;
+ }
+ }
return NULL;
}