diff --git a/conda/common/url.py b/conda/common/url.py index ad43c0947e7..5b244539059 100644 --- a/conda/common/url.py +++ b/conda/common/url.py @@ -51,6 +51,8 @@ def path_to_url(path): @memoize def urlparse(url): + if on_win and url.startswith('file:'): + url.replace('\\', '/') return parse_url(url) diff --git a/conda/models/channel.py b/conda/models/channel.py index 4c452b1bcc4..6fc9abe23f0 100644 --- a/conda/models/channel.py +++ b/conda/models/channel.py @@ -212,6 +212,8 @@ def from_value(value): return Channel(name=UNKNOWN_CHANNEL) value = ensure_text_type(value) if has_scheme(value): + if value.startswith('file:') and on_win: + value = value.replace('\\', '/') return Channel.from_url(value) elif is_path(value): return Channel.from_url(path_to_url(value))