Conversation
|
The particular example of |
|
https://doc.rust-lang.org/std/path/enum.Component.html |
|
I'm not following your reasoning. Actually I think this change may be fine because this is only for checking individual segments reinterpreted as separate paths, but it's really not obvious to me, and what the documentation about prefix says seems not very relevant to the discussion. (the code in question rejects anything that is not |
What I meant is that is does not matter if the reinterpreted prefix is pushed to the path buffer as the absolute behavior from #204 only happens on windows. This change should be fine and does the check if it's running on windows. |
Motivation
The component check only works on windows. If this was run on linux, the code will always push the component to the path_to_file variable, even if it contains c: in the path.
Solution
Use #[cfg(target_os = "windows")] to disable it