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:
committed by
Carlos R. Mafra
parent
0451160f7d
commit
5377ec8fba
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user