1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-13 21:35:45 +01:00

wmmenugen: Add executable detection, make Wmconfig use it

Add fileInPath, which determines whether or not a given file exists
in $PATH (some heuristics apply).

Make the Wconfig parser use it.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
Tamas TEVESZ
2010-10-09 01:52:14 +02:00
committed by Carlos R. Mafra
parent 0451160f7d
commit 5377ec8fba
3 changed files with 50 additions and 2 deletions

View File

@@ -185,8 +185,10 @@ static Bool wmc_to_wm(WMConfigMenuEntry **wmc, WMMenuEntry **wm)
char *p;
size_t slen;
/* only Exec is mandatory */
if (!*wmc || !(*wmc)->Exec || !*(*wmc)->Exec)
/* only Exec is mandatory, and it's better exist in a known place */
if (!*wmc ||
!(*wmc)->Exec || !*(*wmc)->Exec ||
!fileInPath((*wmc)->Exec))
return False;
/* normalize Exec: wmconfig tends to stuck an ampersand