-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Milestone
Description
g_find_program_in_path:
- case insensitivity?
- likely wrong order of extensions
- possibly wrong extensions
The right order and possibly the right set, is what cmd uses:
$ wine cmd /c set path
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
But I'd be leary of the ones after .cmd.
This is quite semantically meaningful as people will have
foo.com in order to be preferred over foo.exe.
.com used to mean a different file format, but that was decades ago - too many calls to strlen buried in there
- lack of const/static on the array of suffixes
- better to loop on G_ELEMS than until NULL
- to address case insensitivity and strlen-in-loop,
suggest g_memicmp
Also need to see what desktop CLR does.