fetchItem: don't treat UNC paths as protocol-relative URLs.
These are paths beginning `//?/UNC/...`. Closes #5127.
This commit is contained in:
parent
b3473df417
commit
97acf152e0
1 changed files with 2 additions and 1 deletions
|
@ -569,7 +569,8 @@ downloadOrRead s = do
|
||||||
case parseURIReference' s' of
|
case parseURIReference' s' of
|
||||||
Just u' -> openURL $ show $ u' `nonStrictRelativeTo` u
|
Just u' -> openURL $ show $ u' `nonStrictRelativeTo` u
|
||||||
Nothing -> openURL s' -- will throw error
|
Nothing -> openURL s' -- will throw error
|
||||||
(Nothing, s'@('/':'/':_)) -> -- protocol-relative URI
|
(Nothing, s'@('/':'/':c:_)) | c /= '?' -> -- protocol-relative URI
|
||||||
|
-- we exclude //? because of //?UNC/ on Windows
|
||||||
case parseURIReference' s' of
|
case parseURIReference' s' of
|
||||||
Just u' -> openURL $ show $ u' `nonStrictRelativeTo` httpcolon
|
Just u' -> openURL $ show $ u' `nonStrictRelativeTo` httpcolon
|
||||||
Nothing -> openURL s' -- will throw error
|
Nothing -> openURL s' -- will throw error
|
||||||
|
|
Loading…
Add table
Reference in a new issue