summaryrefslogtreecommitdiff
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
parent089d73a8b0efad8f3511cebd2863d0d5521dc30d (diff)
downloadrockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.zip
rockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.tar.gz
rockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.tar.bz2
rockbox-3c10fd592c633fad427eb7009a76c937cfcb3027.tar.xz
Fixed 'Insert directory' bug.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5788 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playlist.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 924b904..5eb7d6b 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -545,15 +545,17 @@ static int add_directory_to_playlist(struct playlist_info* playlist,
/* use the tree browser dircache to load files */
global_settings.dirfilter = SHOW_ALL;
- num_files = ft_load(tc, dirname);
- files = (struct entry*) tc->dircache;
- if(!num_files)
+ if (ft_load(tc, dirname) < 0)
{
splash(HZ*2, true, str(LANG_PLAYLIST_DIRECTORY_ACCESS_ERROR));
- return 0;
+ global_settings.dirfilter = dirfilter;
+ return -1;
}
+ files = (struct entry*) tc->dircache;
+ num_files = tc->filesindir;
+
/* we've overwritten the dircache so tree browser will need to be
reloaded */
reload_directory();