diff --git a/NuKeeper.Git/LibGit2SharpDiscoveryDriver.cs b/NuKeeper.Git/LibGit2SharpDiscoveryDriver.cs index 5eef5e72c..2820598b9 100644 --- a/NuKeeper.Git/LibGit2SharpDiscoveryDriver.cs +++ b/NuKeeper.Git/LibGit2SharpDiscoveryDriver.cs @@ -28,7 +28,7 @@ public async Task IsGitRepo(Uri repositoryUri) return false; } - return Repository.IsValid(discovered.AbsolutePath); + return Repository.IsValid(Uri.UnescapeDataString(discovered.AbsolutePath)); } public async Task> GetRemotes(Uri repositoryUri) @@ -38,7 +38,7 @@ public async Task> GetRemotes(Uri repositoryUri) return Enumerable.Empty(); } - var discover = Repository.Discover(repositoryUri.AbsolutePath); + var discover = Repository.Discover(Uri.UnescapeDataString(repositoryUri.AbsolutePath)); var gitRemotes = new List(); using (var repo = new Repository(discover)) @@ -70,7 +70,7 @@ public Task DiscoverRepo(Uri repositoryUri) { return Task.Run(() => { - var discovery = Repository.Discover(repositoryUri.AbsolutePath); + var discovery = Repository.Discover(Uri.UnescapeDataString(repositoryUri.AbsolutePath)); if (string.IsNullOrEmpty(discovery)) { diff --git a/NuKeeper/Engine/GitRepositoryEngine.cs b/NuKeeper/Engine/GitRepositoryEngine.cs index 651b8cf4a..ba1af7541 100644 --- a/NuKeeper/Engine/GitRepositoryEngine.cs +++ b/NuKeeper/Engine/GitRepositoryEngine.cs @@ -62,8 +62,8 @@ public async Task Run(RepositorySettings repository, IFolder folder; if (repository.IsLocalRepo) { - folder = new Folder(_logger, new DirectoryInfo(repository.RemoteInfo.LocalRepositoryUri.AbsolutePath)); - settings.WorkingFolder = new Folder(_logger, new DirectoryInfo(repository.RemoteInfo.WorkingFolder.AbsolutePath)); + folder = new Folder(_logger, new DirectoryInfo(Uri.UnescapeDataString(repository.RemoteInfo.LocalRepositoryUri.AbsolutePath))); + settings.WorkingFolder = new Folder(_logger, new DirectoryInfo(Uri.UnescapeDataString(repository.RemoteInfo.WorkingFolder.AbsolutePath))); repositoryData.IsLocalRepo = repository.IsLocalRepo; if (!repositoryData.IsFork) //check if we are on a fork. If not on a fork we set the remote to the locally found remote