Question about recent juce_posix_SharedCode.h change


#1

See:

https://github.com/julianstorer/JUCE/commit/b010df5bcd193da63e6f60c9f517c33a796673d0?diff=unified#diff-f60bdbd89def13ce8784e5500b6e5630R1049

Since the *nix function execvp() (http://linux.die.net/man/3/execvp) supports absolute paths, why do we have to go through the current working directory instead of feeding an absolute path when creating a process?

To be generic enough, shouldn't that assertion just care if the path is non-empty and pointing to an existing file?


#2

Not sure what you mean..?

The assertion only uses the CWD because otherwise creating a File from a partial path will itself throw an assertion to complain about not knowing what this path should be relative to.

But the path string that gets passed to execvp is the original one that the caller passed in, which could legitimately be a relative path.