Skip to content

Fix path normalization #1115

Closed
Closed

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.

This issue is an extension of #570 and #954.

Activity

  1. andyleejordan commented on Jun 16, 2016

    @andyleejordan
    MemberAuthor

    Bookmarking for reference, NavigationCmdletProvider API.

  2. removed their assignment
    on Jul 21, 2016
  3. vors commented on Jul 21, 2016

    @vors
    Collaborator

    Maybe we can move it for Future?

  4. modified the milestones: , Aug17 on Jul 28, 2016
  5. modified the milestones: , on Aug 3, 2016
  6. 1 remaining item

  7. removed this from the milestone on Aug 3, 2016
  8. andyleejordan commented on Oct 4, 2016

    @andyleejordan
    MemberAuthor

    Removing assignment as this is future work that will require going through RFC.

  9. joeyaiello commented on May 22, 2017

    @joeyaiello
    Contributor

    Bruce Payette (@BrucePay): I think we're "good enough" in this regard already. Since you've been in the globbing code lately, do you know of any shortcoming we still have from a functional perspective? I'd like to close this in lieu of more specific issues.

  10. jeffbi commented on May 22, 2017

    @jeffbi

    FWIW, In issue #3414 I mentioned that part of the issue is "premature normalization".

    Also, paths ending up fully-qualified (I believe by the globbing mechanism) makes it difficult to provide relative paths to cmdlets like New-Item -ItemType SymbolicLink (#3500).

  11. joeyaiello commented on May 22, 2017

    @joeyaiello
    Contributor

    jeffbi: thanks for the context. I'm adding this to our Usability project. At some point, I need to look at all these and figure out holistically what we're okay with.

  12. modified the milestones: , on Jun 5, 2017
  13. joeyaiello commented on Aug 7, 2017

    @joeyaiello
    Contributor

    Andrew (@anmenaga) do you have enough context from jeffbi for this to be actionable?

  14. anmenaga commented on Sep 18, 2017

    @anmenaga

    This is very high-level and broad kind of issue, which is too risky at this point.
    Closing this as duplicate of more specific and narrow #3666 and #3500.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions