summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAntoine Cellerier <dionoea@videolan.org>2006-07-23 00:07:11 +0000
committerAntoine Cellerier <dionoea@videolan.org>2006-07-23 00:07:11 +0000
commit9ab9b6e954ff26952a4f69001e164cfa8b62e272 (patch)
tree4660bb6b6b119ff3e107a51e26ddfdbe460d07cb /apps
parentebfb4f3ab2b0e832ee336ca99f5787536f12af59 (diff)
Fix file browser (which fixes file loading from menu). Looks like errno isn't set as expected when using opendir on real targets.
Btw, i forgot to give credit to Eli Sherer for the original rockpaint idea and code in my previous commit. Thanks :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10288 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/rockpaint.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/rockpaint.c b/apps/plugins/rockpaint.c
index 7ca4cb50f8..77259e4fbb 100644
--- a/apps/plugins/rockpaint.c
+++ b/apps/plugins/rockpaint.c
@@ -646,13 +646,14 @@ static bool browse( char *dst, int dst_size, const char *start )
d = rb->PREFIX(opendir)( bbuf );
if( !d )
{
+ /*
if( errno == ENOTDIR )
- {
+ {*/
/* this is a file */
bbuf[rb->strlen(bbuf)-1] = '\0';
rb->strncpy( dst, bbuf, dst_size );
return true;
- }
+ /*}
else if( errno == EACCES || errno == ENOENT )
{
bbuf[0] = '/'; bbuf[1] = '\0';
@@ -661,7 +662,7 @@ static bool browse( char *dst, int dst_size, const char *start )
else
{
return false;
- }
+ }*/
}
top_inside = draw_window( HEIGHT, WIDTH, &top, &left, bbuf );
i = 0;
@@ -2158,7 +2159,7 @@ static void draw_toolbars(bool update)
static void toolbar( void )
{
- unsigned int button, i, j;
+ int button, i, j;
restore_screen();
draw_toolbars( false );
y = LCD_HEIGHT-TB_HEIGHT/2;