From 76855f0039d1659d992b7b7c705c45a6c4f4dead Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Tue, 3 Jul 2007 23:18:14 +0000 Subject: [PATCH] File/Dir properties should at least print an error message when something goes wrong git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13780 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/properties.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index f58a412056..1726e01c34 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -308,16 +308,16 @@ enum plugin_status plugin_start(struct plugin_api* api, void* file) return PLUGIN_OK; } - /* get the info */ - if(its_a_dir) + /* get the info depending on its_a_dir */ + if(!(its_a_dir ? dir_properties((char*)file):file_properties((char*)file))) { - if(!dir_properties((char*)file)) - return PLUGIN_OK; - } - else - { - if(!file_properties((char*)file)) - return PLUGIN_OK; + /* something went wrong */ + rb->lcd_clear_display(); + rb->lcd_puts(0,0,"Failed to gather information"); + rb->lcd_update(); + + rb->action_userabort(TIMEOUT_BLOCK); + return PLUGIN_OK; } /* prepare the list for the user */ -- 2.11.4.GIT