mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
fix<Launcher>: when the directory does not exist, restoring the last opened tab will cause a crash
This commit is contained in:
parent
faa93f6e9a
commit
e47c126384
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue