1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Validate recent repo before blindly opening it

This commit is contained in:
Luka Markušić
2022-06-09 15:57:54 +02:00
committed by Jesse Duffield
parent 658a6b239b
commit a955dbcfd7
2 changed files with 13 additions and 9 deletions

View File

@ -110,6 +110,9 @@ func newRecentReposList(recentRepos []string, currentRepo string) (bool, []strin
newRepos := []string{currentRepo}
for _, repo := range recentRepos {
if repo != currentRepo {
if _, err := os.Stat(repo); err != nil {
continue
}
newRepos = append(newRepos, repo)
} else {
isNew = false