igl icon indicating copy to clipboard operation
igl copied to clipboard

bootstrap.py does not put filepath in quotes when running scripts

Open RRKS101 opened this issue 2 years ago • 1 comments

As the title says; I was in the process of running pre-build steps when it failed due to a directory being cut short ("D:/Programming/Libraries/C++ Libraries/igl" to "D:/Programming/Libraries/C++") This occurred on the bc7enc part only (Im guessing it was the first third-party project that used python to configure it). Using Ctrl+F, I found the call to the log function for running scripts, prom there I just threw a bunch of print statements for values on each line, giving me the state and line where the error occurred which was this line. By inserting escaped quotes on either side of the filename variable, this was fixed for me.

# from
dieIfNonZero(executeCommand(TOOL_COMMAND_PYTHON + " " + filename, False));
# to
dieIfNonZero(executeCommand(TOOL_COMMAND_PYTHON + " \"" + filename + "\"", False));

RRKS101 avatar Jul 11 '23 08:07 RRKS101

Thank you for the bug report!

escapifyPath(filename) should do it.

corporateshark avatar Jul 11 '23 09:07 corporateshark