diff --git a/src/GitHub.Exports/Primitives/UriString.cs b/src/GitHub.Exports/Primitives/UriString.cs index 8125bdaf4f..aeea7e372c 100644 --- a/src/GitHub.Exports/Primitives/UriString.cs +++ b/src/GitHub.Exports/Primitives/UriString.cs @@ -135,8 +135,7 @@ bool ParseScpSyntax(string scpString) public Uri ToRepositoryUrl() { // we only want to process urls that represent network resources - if (!IsValidUri && !IsScpUri) return url; - if (IsValidUri && IsFileUri) return url; + if (!IsScpUri && (!IsValidUri || IsFileUri)) return url; var scheme = url != null && IsHypertextTransferProtocol ? url.Scheme