Fix bug if github repo is provided with trailing slash

This commit is contained in:
Caelan Sayler
2024-03-16 14:11:00 +00:00
parent 484af1b99b
commit 8d1673bbdf

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@@ -41,7 +41,7 @@ namespace Velopack.Sources
/// <inheritdoc />
public GitBase(string repoUrl, string? accessToken, bool prerelease, IFileDownloader? downloader = null)
{
RepoUri = new Uri(repoUrl);
RepoUri = new Uri(repoUrl.TrimEnd('/'));
AccessToken = accessToken;
Prerelease = prerelease;
Downloader = downloader ?? Utility.CreateDefaultDownloader();