Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Correctly check for existing repo in clone dialog.
Browse files Browse the repository at this point in the history
The clone dialog was validating for the presence of an existing repo at
the destination path, but the validation was dependent upon the
_previous_ validation state. Make sure the current path is always
validated. Fixes #394. Fixes #109.
  • Loading branch information
grokys committed Jul 5, 2016
1 parent 365e7b7 commit 7ae113c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs
Expand Up @@ -175,12 +175,8 @@ bool IsAlreadyRepoAtPath(string path)

if (SelectedRepository != null)
{
var validationResult = BaseRepositoryPathValidator.ValidationResult;
if (validationResult != null && validationResult.IsValid)
{
string potentialPath = Path.Combine(path, SelectedRepository.Name);
isAlreadyRepoAtPath = operatingSystem.Directory.Exists(potentialPath);
}
string potentialPath = Path.Combine(path, SelectedRepository.Name);
isAlreadyRepoAtPath = operatingSystem.Directory.Exists(potentialPath);
}

return isAlreadyRepoAtPath;
Expand Down

0 comments on commit 7ae113c

Please sign in to comment.