changeset 25295:c0bfef5a23da

rework of libmenu open_dir()
author ben
date Sat, 08 Dec 2007 16:27:25 +0000
parents 46c9a864dc26
children e91e3944c07d
files libmenu/menu_filesel.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;