Fix assertion error when a drive letter path is passed to command line#368
Fix assertion error when a drive letter path is passed to command line#368rhysd wants to merge 1 commit intomicrosoft:mainfrom
Conversation
|
I think I understand what the issue is now and I believe this needs a fundamentally different approach. When you call |
|
One possible approach could be to replace |
|
Yeah, that's the behavior I roughly explained in #367. |
That's not right.
This is the behavior of the directory handling code in ntdll, shared across all Win32 APIs. So, in this sense, So, Rust's |
|
Oh, I see... Thank you for the correction! |
|
Yeah, so I think we have two options:
Which one should we take considering the Edit's behavior? |
|
I believe we should go with the 3rd options for now and simply append a |
Note that |
|
Yep, exactly like the equivalent in C++. I'd of course also be fine with documenting it as "may want to use |
If you say so. I left the C++ world before |
Let me confirm the behavior before implementing it. I understood that |
|
These are the kinds of Windows edge cases that I bet do not come up much in practice today, so whatever we do will be such a rare occurrence that the choice now doesn't matter much. I'll leave this up to you. I do have a specific approach in mind, however, in case you aren't sure yourself. |
|
Okay, I'll try to implement it. I think the workaround should be as simple as possible so I'll simply try to insert the path separator. Once the implementation is done I'll request your review. |
Fix #367
Joining paths with
Path::joindoes not always return an absolute path even if the left hand side is an absolute path. We need to check it before callingpath::normalize.