Skip to content

Commit 27ac868

Browse files
authored
Merge pull request #263 from jwittner/fix/uriForAuth
Only strip functions if there is one
2 parents 6ac09e9 + 6557a20 commit 27ac868

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Assets/NuGet/Editor/NugetHelper.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,10 +1604,15 @@ private static void DownloadCredentialProviders(Uri feedUri)
16041604
private static Uri GetTruncatedFeedUri(Uri methodUri)
16051605
{
16061606
string truncatedUriString = methodUri.GetLeftPart(UriPartial.Path);
1607-
int lastSeparatorIndex = truncatedUriString.LastIndexOf('/');
1608-
if (lastSeparatorIndex != -1)
1607+
1608+
// Pull off the function if there is one
1609+
if (truncatedUriString.EndsWith(")"))
16091610
{
1610-
truncatedUriString = truncatedUriString.Substring(0, lastSeparatorIndex);
1611+
int lastSeparatorIndex = truncatedUriString.LastIndexOf('/');
1612+
if (lastSeparatorIndex != -1)
1613+
{
1614+
truncatedUriString = truncatedUriString.Substring(0, lastSeparatorIndex);
1615+
}
16111616
}
16121617
Uri truncatedUri = new Uri(truncatedUriString);
16131618
return truncatedUri;

0 commit comments

Comments
 (0)