-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
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 a path.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.