Thanks to visit codestin.com
Credit goes to github.com

Skip to content

g_find_program_in_path: #6628

@jaykrell

Description

@jaykrell

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions