You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__Issue:__ Trying to `:cd` into a [UNC Path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths) on Windows would fail
__Defect:__ #3142 moved away from using `string`s 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:__
- Considering porting fix to `Fp`(after some dependent PRs are in, like reasonml/reason-native#261)
Fixes#3151
Discovered here: onivim/oni2#3151
On Windows,
Fp.absoluteCurrentPlatform
doesn't handle UNC paths - this is needed for referencing network shares.Nice set of test cases here: https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#example-ways-to-refer-to-the-same-file
The text was updated successfully, but these errors were encountered: