summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
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();