Skip to content

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

Merged
Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:wsl-drive
Oct 8, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 6 commits into
PowerShell:masterfrom
SteveL-MSFT:wsl-drive

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 1, 2019 •

Copy link
Copy Markdown
Member

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

@rjmholt Rob Holt (rjmholt) left a comment

Copy link
Copy Markdown
Collaborator

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

Co-Authored-By: Ilya <darpa@yandex.ru>
@iSazonov

Copy link
Copy Markdown
Collaborator

Rob Holt (@rjmholt) It seems your account lost permissions.

Copy link
Copy Markdown
Contributor

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

It seems your account lost permissions.

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

@iSazonov

Copy link
Copy Markdown
Collaborator

Rob Holt (@rjmholt) I see the same for Paul account. But previously approve had green label.
/cc Travis Plunk (@TravisEz13)

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Rob Holt (@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 Ilya (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
Aditya Patwardhan (adityapatwardhan) merged commit ef2d740 into PowerShell:master Oct 8, 2019
@rjmholt

Copy link
Copy Markdown
Collaborator

Ilya (@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

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

Handy links:

@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the wsl-drive branch June 6, 2020 02:31
@clayms clayms mentioned this pull request Jul 14, 2021
5 tasks done
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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