mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-29 20:43:37 +03:00
say session does not exist if meta does not exist
This commit is contained in:
parent
f92a2370bd
commit
ea9fa3dca4
@ -67,12 +67,11 @@ fn parse_reflog_line(line: &str) -> Result<Activity> {
|
||||
impl Session {
|
||||
pub fn current(repo: &git2::Repository, project: &projects::Project) -> Result<Option<Self>> {
|
||||
let session_path = project.session_path();
|
||||
if !session_path.exists() {
|
||||
let meta_path = session_path.join("meta");
|
||||
if !meta_path.exists() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
let meta_path = session_path.join("meta");
|
||||
|
||||
let start_path = meta_path.join("start");
|
||||
let start_ts = std::fs::read_to_string(start_path.clone())?
|
||||
.parse::<u64>()
|
||||
|
Loading…
Reference in New Issue
Block a user