Sanitize user-provided custom build directory before passing it forward
What does this MR do?
Run user-provided custom build directory through path.Clean
before returning it to other functions. Prevents undefined behavior that could arise when using GIT_CLONE_PATH
as reference to build other directory paths.
Why was this MR needed?
Currently, TmpProjDir is built using a [possibly] user defined variable. The current implementation implies different behaviors depending on how that variable is defined, such as adding a folder level when a trailing slash is present.
What's the best way to test this MR?
- Define
GIT_CLONE_PATH
with and without a trailing slash - Resulting
TmpProjDir
should be the same in both cases.
What are the relevant issue numbers?
Closes #28946 (closed)
Edited by Romuald Atchadé