Avoid testing impossible file paths on Windows.

This commit is contained in:
Josh Matthews 2016-03-28 13:30:05 -04:00
parent e4cda55249
commit 04df5decee
2 changed files with 31 additions and 2 deletions

View file

@ -868,7 +868,7 @@ pub fn parse_url_or_filename(cwd: &Path, input: &str) -> Result<Url, ()> {
match Url::parse(input) {
Ok(url) => Ok(url),
Err(url::ParseError::RelativeUrlWithoutBase) => {
Ok(Url::from_file_path(&*cwd.join(input)).unwrap())
Url::from_file_path(&*cwd.join(input))
}
Err(_) => Err(()),
}