Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWindows: implement conversion to/from UNC paths #284
Closed
+91
−49
Conversation
|
|
|
|
bors-servo
added a commit
that referenced
this pull request
Jun 13, 2017
Windows: implement conversion to/from UNC paths This is a rebase of #284 with some additional fixes. Original work by @wfraser, sorry I took so long to get to this! Fixes #284. r? @nox for the last two commits. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/360) <!-- Reviewable:end -->
|
Landed with a rebase and some fixes in #360. Sorry this took so long! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
wfraser commentedFeb 28, 2017
•
edited by larsbergstrom
Currently, taking a path like
\\fileserver\share\foo\bar.txtand trying to make a URL out of it results in an error. However, this can be turned into a file URL:file://fileserver/share/foo/bar.txt. Note the lack of the usual triple-slash.The reverse is also implemented: a
file:URL with a non-empty host is taken to be a UNC path.This conversion is only enabled on Windows.
I was motivated to do this after trying to run Cargo in a remote directory. Currently it errors out because it uses
rust-urlto convert all its paths to URLs, and fails to convert its working directory to one. I made a build of Cargo using these changes, and it was then able to build in a directory on a remote machine!This change is