-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Fix path normalization #1115
Copy link
Copy link
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugOS-LinuxPortingResolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
Milestone
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugOS-LinuxPortingResolution-DuplicateThe issue is a duplicate.The issue is a duplicate.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Per #1081, we have the known issue of not supporting a path with a literal backward slash for PowerShell cmdlets. This branch is work-in-progress that investigated PowerShell's path normalization.
The summary is that it's a mess. PowerShell has half a dozen different path normalization functions (all essentially just blindly replacing
/with\, or the reverse on Linux), another dozen locations where these are ignored and apath.Replace()is done, and completely separate code to handle escape character parsing (which is tied into the globbing system); and all of this is spread across several systems.My WIP branch removes all the normalization functions and adds some (dumb, so far) logic to handle a path with a backtick escaped backward slash (but it needs to be improved to handle backtick escaped backticks). Normalization of all backticks can only happen once, and we need to figure out how to make this happen, because parsing globs must be handled around the same time (since glob characters may be escaped). As of now, the WIP does allow escaping a backward slash with a backtick.
This issue is an extension of #570 and #954.