optimize<Dashboard>: ISSUE #3 Rebase merge request detected but there is no rebase in progress.

This commit is contained in:
leo 2022-07-07 09:25:41 +08:00
parent e779d1b65e
commit a19f81a708
2 changed files with 16 additions and 14 deletions

View file

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Json.Serialization;
namespace SourceGit.Models {
@ -40,5 +41,11 @@ namespace SourceGit.Models {
CommitMessages.Insert(0, message);
}
public bool ExistsInGitDir(string file) {
if (string.IsNullOrEmpty(file)) return false;
string fullpath = System.IO.Path.Combine(GitDir, file);
return Directory.Exists(fullpath) || File.Exists(fullpath);
}
}
}