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

Commit 7ae113c

Browse files
committed
Correctly check for existing repo in clone dialog.
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.
1 parent 365e7b7 commit 7ae113c

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,8 @@ bool IsAlreadyRepoAtPath(string path)
175175

176176
if (SelectedRepository != null)
177177
{
178-
var validationResult = BaseRepositoryPathValidator.ValidationResult;
179-
if (validationResult != null && validationResult.IsValid)
180-
{
181-
string potentialPath = Path.Combine(path, SelectedRepository.Name);
182-
isAlreadyRepoAtPath = operatingSystem.Directory.Exists(potentialPath);
183-
}
178+
string potentialPath = Path.Combine(path, SelectedRepository.Name);
179+
isAlreadyRepoAtPath = operatingSystem.Directory.Exists(potentialPath);
184180
}
185181

186182
return isAlreadyRepoAtPath;

0 commit comments

Comments
 (0)