Skip to content

Add support for \\wsl$\ubuntu path#10674

Merged
adityapatwardhan merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:wsl-drive
Oct 8, 2019
Merged

Add support for \\wsl$\ubuntu path#10674
adityapatwardhan merged 6 commits intoPowerShell:masterfrom
SteveL-MSFT:wsl-drive

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

@SteveL-MSFT SteveL-MSFT commented Oct 1, 2019

PR Summary

WSL2 introduces a new filesystem path to access the Linux filesystem from Windows. Depending on the distro name, it would look like \\wsl$\ubuntu. The problem is that this is not a valid UNC path so it gets rejected outright.
Fix is to check for this type of path and pass it off as a UNC path so that the filesystemprovider accepts it as a valid filesystem path. The .NET APIs handle this just fine once it makes it that far into the code.

Manually validated dir \\wsl$\ubuntu and cd \\wsl$\ubuntu; dir

PR Context

Fix #10360

PR Checklist

@SteveL-MSFT SteveL-MSFT added this to the 7.0.0-preview.5 milestone Oct 1, 2019
Copy link
Copy Markdown
Collaborator

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if we could have tests for this in an image with WSL

@iSazonov
Copy link
Copy Markdown
Collaborator

iSazonov commented Oct 4, 2019

@rjmholt It seems your account lost permissions.

Copy link
Copy Markdown
Contributor

@jazzdelightsme jazzdelightsme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@rjmholt
Copy link
Copy Markdown
Collaborator

rjmholt commented Oct 4, 2019

It seems your account lost permissions.

Apparently that's intended since I'm not a maintainer

@iSazonov
Copy link
Copy Markdown
Collaborator

iSazonov commented Oct 4, 2019

@rjmholt I see the same for Paul account. But previously approve had green label.
/cc @TravisEz13

@SteveL-MSFT
Copy link
Copy Markdown
Member Author

@rjmholt not a maintainer... yet

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 7, 2019
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Oct 8, 2019
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 8, 2019
@adityapatwardhan adityapatwardhan merged commit ef2d740 into PowerShell:master Oct 8, 2019
@rjmholt
Copy link
Copy Markdown
Collaborator

rjmholt commented Oct 9, 2019

@iSazonov

But previously approve had green label.

Yeah, the permissions have been updated so that non-maintainers can't give merge-permitting approval, and there are a few of us on the PowerShell team who aren't maintainers (which makes sense to me -- they're different hats to wear).

@ghost
Copy link
Copy Markdown

ghost commented Oct 23, 2019

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

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

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set-Location \\wsl$\Ubuntu throws an error

6 participants