[MPlayer-cvslog] r25323 - trunk/libmenu/menu_filesel.c
Ulion
ulion2002 at gmail.com
Sun Dec 9 04:55:12 CET 2007
2007/12/9, Benjamin Zores <ben at geexbox.org>:
> ben a écrit :
> > Author: ben
> > Date: Sat Dec 8 17:27:25 2007
> > New Revision: 25323
> >
> > Log:
> > rework of libmenu open_dir()
> >
> > Modified:
> > trunk/libmenu/menu_filesel.c
> >
> > Modified: trunk/libmenu/menu_filesel.c
> > ==============================================================================
> > --- trunk/libmenu/menu_filesel.c (original)
> > +++ trunk/libmenu/menu_filesel.c Sat Dec 8 17:27:25 2007
> > @@ -180,7 +180,7 @@ static void free_extensions(char **exten
> > }
> > }
> >
> > -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 @@ bailout:
> >
> > 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;
> > +}
>
> Simple use case for those who wonder about this patch:
>
> - use libmenu file selection to go to some network share
> - browse files
> - network shares suddenly become unavailable
> - next time you'll hit "..", you'll be in directory defined as
> "menu-chroot" one (if defined). Without this patch, you'll get stuck
> in a twilight zone ;-)
I think it is just a hack, not a proper patch for this situation.
--
Ulion
More information about the MPlayer-cvslog
mailing list