Patch: Index: apps/plugins/disktidy.c =================================================================== --- apps/plugins/disktidy.c (revision 12061) +++ apps/plugins/disktidy.c (working copy) @@ -340,7 +340,7 @@ int tidy_lcd_menu(void) { - int loc, ret; + int loc, ret = 2; static const struct menu_item items[] = { @@ -365,21 +365,27 @@ { case 0: - return ret; + loc = 4; /* start cleaning */ + break; case 1: rb->set_option("Files to Clean", &ret, INT, system_option, 3, NULL); - break; + break; case 2: - return 99; + ret = 99; + break; default: - return 99; + ret = 99; /* exit plugin */ + break; } + if(loc == 4 || ret == 99) + { + rb->menu_exit(loc); + return ret; + } } - - rb->menu_exit(loc); } /* this is the plugin entry point */ ================================================================ Changed function: while (true) { switch(rb->menu_show(loc)) { case 0: loc = 4; /* start cleaning */ break; case 1: rb->set_option("Files to Clean", &ret, INT, system_option, 3, NULL); break; case 2: ret = 99; break; default: ret = 99; /* exit plugin */ break; } if(loc == 4 || ret == 99) { rb->menu_exit(loc); return ret; } }