enhance: improve readability of default clone dir errors. (#813)

This commit is contained in:
Ezra 2024-12-13 15:08:47 +13:00 committed by GitHub
parent 02658839c2
commit 26923435e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,9 +119,9 @@ namespace SourceGit.ViewModels
{ {
var defaultCloneDir = Preference.Instance.GitDefaultCloneDir; var defaultCloneDir = Preference.Instance.GitDefaultCloneDir;
if (string.IsNullOrEmpty(defaultCloneDir)) if (string.IsNullOrEmpty(defaultCloneDir))
App.RaiseException(PopupHost.Active.GetId(), "The default clone dir haven't been configured!"); App.RaiseException(PopupHost.Active.GetId(), "The default clone dir hasn't been configured!");
else if (!Directory.Exists(defaultCloneDir)) else if (!Directory.Exists(defaultCloneDir))
App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' is not exists!"); App.RaiseException(PopupHost.Active.GetId(), $"The default clone dir '{defaultCloneDir}' does not exist!");
else if (PopupHost.CanCreatePopup()) else if (PopupHost.CanCreatePopup())
PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir)); PopupHost.ShowAndStartPopup(new ScanRepositories(defaultCloneDir));
} }