# HG changeset patch # User ben # Date 1197131245 0 # Node ID c0bfef5a23dab7c253d3bffa05046126ea65e469 # Parent 46c9a864dc26c3474d0028f61a32fc8c5d0d50d2 rework of libmenu open_dir() diff -r 46c9a864dc26 -r c0bfef5a23da libmenu/menu_filesel.c --- a/libmenu/menu_filesel.c Sat Dec 08 14:19:12 2007 +0000 +++ b/libmenu/menu_filesel.c Sat Dec 08 16:27:25 2007 +0000 @@ -180,7 +180,7 @@ } } -static int open_dir(menu_t* menu,char* args) { +static int _open_dir(menu_t* menu,char* args) { char **namelist, **tp; struct dirent *dp; struct stat st; @@ -291,7 +291,13 @@ return 1; } - +static int open_dir(menu_t* menu,char* args) { + if (_open_dir(menu, args)) + return 1; + if (menu_chroot && _open_dir(menu, menu_chroot)) + return 1; + return 0; +} static char *action;