When working on D76869, I discovered some failing scenarios for sys::path::replace_path_prefix.
However, this function is already a bit complex and the fix would make the logic harder to read.
Also, its parameters strict and style are always used with the default value.
This patch removes the 2 parameters, reducing the code greatly and made it easier to fix the failing cases.
Overall, I was planning to split my work in 3 steps:
- This fix
- finish D76869 (which this fix will make smaller/simpler)
- Modifiy replace_prefix_map under windows, to replace startswith with a case and separator insensitive version (for example, C:\\OneFolder\\ would match c:/onefolder/file.cpp)
So, this change restores the original 3-parameter form of replace_path_prefix. LG