mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
fix<Launcher>: when the directory does not exist, restoring the last opened tab will cause a crash
This commit is contained in:
@@ -89,6 +89,7 @@ namespace SourceGit {
|
||||
var actived = null as Models.Repository;
|
||||
if (restore.IsEnabled && restore.Opened.Count > 0) {
|
||||
foreach (var path in restore.Opened) {
|
||||
if (!Directory.Exists(path)) continue;
|
||||
var repo = Models.Preference.Instance.FindRepository(path);
|
||||
if (repo != null) Models.Watcher.Open(repo);
|
||||
if (path == restore.Actived) actived = repo;
|
||||
|
||||
Reference in New Issue
Block a user