Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(windows/#3151): Support UNC paths when changing directories #3162

Merged
merged 9 commits into from
Feb 19, 2021

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Feb 19, 2021

Issue: Trying to :cd into a UNC Path on Windows would fail

Defect: #3142 moved away from using strings to strongly-typed paths (Fp.t), to help ensure consistent normalization. However, the parsing logic for ingesting a string -> option(Fp.t) did not handle parsing UNC paths, so the system would treat it as a failed path.

Fix: Ideally, Fp could handle this out of the box: reasonml/reason-native#262

In the meantime, add an 'adapter' layer around Fp - when ingesting strings for Windows, first try to see if it is a UNC-style path. If it is, grab the server and share name and store it around an Fp path. Proxy all operations to and from the Fp path.

When the Fp is converted back to a string, make sure to use backslashes for that type of path.

Next steps:

Fixes #3151

@bryphe bryphe added the WIP label Feb 19, 2021
@bryphe bryphe removed the WIP label Feb 19, 2021
@bryphe bryphe merged commit fe06c60 into master Feb 19, 2021
@bryphe bryphe deleted the fix/windows/3151/unc-path-support branch February 19, 2021 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opening folder doesn't work for network share (in latest nightly)
1 participant