[MPlayer-cvslog] r25556 - trunk/libmenu/menu_filesel.c

Rich Felker dalias at aerifal.cx
Thu Jan 17 09:39:56 CET 2008


On Thu, Jan 17, 2008 at 04:08:51PM +0800, Ulion wrote:
> try libmenu's file selection feature, the path we resolved will be
> showed on the menu title, there need an absolute path. so what we need
> is a path join function, just join a relative path to an absolute one,

Perhaps it should special-case the situation where absolute pathname
cannot be determined or used, and use only relative pathnames in this
case. Or maybe it's not worth supporting menu for these cases.

By the way, another case where absolute pathnames cannot work is when
the level of directory nesting would make an absolute pathname exceed
PATH_MAX (4096 on Linux). In this case the only way to access files is
with relative pathnames.

> and combine any './' or '../', and even more it's better it can handle

There's an issue that replacing .. logically will not give the same
results when the previous pathname element is a symlink. I.e.
/foo/bar/symlink/.. != /foo/bar.

> '\' properly for pathes come from command line parameter by windows
> user.

I wonder if it would be sane to have the startup code for the Windows
build sanitize the pathnames to remove '\' when parsing the command
line.

Rich



More information about the MPlayer-cvslog mailing list