summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2005-02-04 13:20:25 +0000
committerBjörn Stenberg <bjorn@haxx.se>2005-02-04 13:20:25 +0000
commit3c10fd592c633fad427eb7009a76c937cfcb3027 (patch)
tree1071f94107deb0392dcbe4c386f2661042d85932 /apps/playlist.c
parent089d73a8b0efad8f3511cebd2863d0d5521dc30d (diff)
downloadrockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.tar.gz
rockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.zip
Fixed 'Insert directory' bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5788 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 924b9041e8..5eb7d6b450 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -545,15 +545,17 @@ static int add_directory_to_playlist(struct playlist_info* playlist,
545 545
546 /* use the tree browser dircache to load files */ 546 /* use the tree browser dircache to load files */
547 global_settings.dirfilter = SHOW_ALL; 547 global_settings.dirfilter = SHOW_ALL;
548 num_files = ft_load(tc, dirname);
549 files = (struct entry*) tc->dircache;
550 548
551 if(!num_files) 549 if (ft_load(tc, dirname) < 0)
552 { 550 {
553 splash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR)); 551 splash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
554 return 0; 552 global_settings.dirfilter = dirfilter;
553 return -1;
555 } 554 }
556 555
556 files = (struct entry*) tc->dircache;
557 num_files = tc->filesindir;
558
557 /* we've overwritten the dircache so tree browser will need to be 559 /* we've overwritten the dircache so tree browser will need to be
558 reloaded */ 560 reloaded */
559 reload_directory(); 561 reload_directory();