From 7ae113c7697a1803fb7dce22d5ffb27cbe089c8f Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Tue, 5 Jul 2016 12:46:12 +0200 Subject: [PATCH] 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. --- src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs b/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs index f55bfdfa25..13dbed03f0 100644 --- a/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs +++ b/src/GitHub.App/ViewModels/RepositoryCloneViewModel.cs @@ -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;